Following code has been tested with jQuery 1.4.1 . Code demo links are the end of the blog .
fadeTo method of jQuery ,strangely, fades event the hidden elements.
Here is html markup.
Since the first
p is hidden, you will see only one
p element in the browser. Now execute following jQuery code.
You will see both the
jQuery goes out of its way to make sure that hidden elements are visible. Here is
Also notice that for a hidden element fadeTo operation starts with opacity of zero, while other elements will go down towards zero.
Checkout the same demo in slow motion and notice that while the first p element emerges out of hiding, the other p element is slowing fading. This might cause unwanted effect . So watch out for this one.