I have a list that I would like开发者_JAVA技巧 to fadeOut, but not have it collapse. The documentation says "Once the opacity reaches 0, the display style property is set to none".
I wonder if I could fadeOut down to 1 or something.
Have you tried using jQuery's fadeTo() function and then setting it to a 0 opacity? Something like this:
$('#myDiv').fadeTo('medium', 0);
How about just using .animate()
to animate the opacity
to 0 instead of using the .fadeOut()
method?
Example: http://jsfiddle.net/ZqBGa/
$( selector ).animate({opacity: 0});
This will retain the element in the page structure, but it will be invisible.
Wrap the list in a div with a set height, then fade out the list.
Example: http://jsfiddle.net/CtQcR/
精彩评论