I would like to have a menu (drop-down box replacement box) that disappears when clicked, but the selected option stays a bit longer. As the name implies, this is the same behavior observed in Windows XP when all the "smart" effects are turned on - the menu quickly disappears, leaving the selected option slower.
My question is how to implement this using jQuery. I could use a selector to select all the children of the parent except the selected parameter, but it is messy; Ideally, I would like to fade away the container and everything in it, but be able to push out one element from it that is excluded from the animation of the container.
Here is an example HTML:
<ul>
<li>Option</li>
<li>Option</li>
<li class="selected">Option</li>
<li>Option</li>
<li>Option</li>
</ul>
And some pseudo jQuery:
$(document).ready(function()
{
$("ul").not("ul li.selected").fadeOut(200);
$("li.selected").fadeOut(600);
});
, , , , .