Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fadeOut without collapse

Tags:

I have a list that I would like 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.

like image 382
Phillip Senn Avatar asked Oct 13 '10 19:10

Phillip Senn


2 Answers

Have you tried using jQuery's fadeTo() function and then setting it to a 0 opacity? Something like this:

$('#myDiv').fadeTo('medium', 0); 
like image 133
JasCav Avatar answered Sep 22 '22 15:09

JasCav


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.

like image 41
user113716 Avatar answered Sep 23 '22 15:09

user113716