in jquery, how can I show a hidden div, and make it fade in?
+1
A:
$("selector_for_your_div").fadeIn("slow");
For your edification, documentation for all of the bundled jQuery animation effects / tools is located at:
http://api.jquery.com/category/effects/
Sean Vieira
2010-06-07 19:52:15
+7
A:
Just hide the element initially, ether with .hide() or style="display: none;" (or display: none; in the stylesheet). Then, just call .fadeIn(), like this:
$("#elementID").fadeIn();
The .fadeIn() call automatically removes the display: none when it fades the opacity to 100%, it won't remove visibility: hidden; so don't use this, or you'll have to remove it manually.
Nick Craver
2010-06-07 19:52:44
Question: why hide it initially using `.hide()` rather than plain ol' CSS?
dclowd9901
2010-06-07 23:58:51
A:
selector.fadeIn(speed in miliseconds) is the function your looking for.
If you want the div to retain its space when its not seen use style="opacity:0;" instead of display:none;
Greg Guida
2010-06-07 23:50:42