Using a .delay() function before .css() manipulation in jQuery

Posted by Fabian on Stack Overflow See other posts from Stack Overflow or by Fabian
Published on 2010-05-28T07:26:43Z Indexed on 2010/05/28 7:31 UTC
Read the original article Hit count: 145

Filed under:
|
|
|
|

I have this:

var $ul = $(this).children("ul");
$ul.animate({opacity: 0}, 1000);
$ul.delay(1000).css("display", "none")

It's for my dropdown menu, and I want it to fade off before it disappears using the display: none; CSS property. However it appears that the .delay() cannot be used on the .css(); it doesn't work, the $ul just disappears right away.

I can't use $ul.animate({opacity: 0, display: "none"}, 1000); either.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about dropdownlist