Jquery fade element does not display visibility: hidden elements

I have a bunch of thumbnails that I upload in the style of visibility: hidden; so that they all maintain their correct layouts. When the page is fully loaded, I have a jquery function that fades them out. This worked when their style was set to display: none; but obviously the layout was bolted. Any suggestions?

There is a line of attenuation:

 $('.littleme').fadeIn('slow'); 
+68
jquery visibility fadein
Mar 12
source share
5 answers

Add a few chains to the chain:

  $('.littleme').css('visibility','visible').hide().fadeIn('slow'); 

This will change it to display:none by 1 frame before fading out and close the area again.

+143
Mar 12 '10 at 20:52
source share

try using opacity and animate() :

 $('.littleme').css('opacity',0).animate({opacity:1}, 1000); 
+25
Mar 12
source share

<span style="opacity:0;">I'm Hidden</span>

Show: $('span').fadeTo(1000,1)

Hide: $('span').fadeTo(1000,0)

Space saved in DOM layout

http://jsfiddle.net/VZwq6/

+8
Mar 19 '14 at 12:10
source share

Can you use fadeTo (duration, value)? Of course, in this way you can fade to 0 and 1, so you do not affect the flow of the document ...

+1
Jan 05 2018-12-15T00:
source share

Try matching a hidden item?

$. ("Littleme: hidden") FadeIn ();

0
Mar 12 '10 at 20:56
source share



All Articles