Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  13] [ 1]  / answers: 1 / hits: 34201  / 14 Years ago, mon, june 7, 2010, 12:00:00

in jquery, how can I show a hidden div, and make it fade in?


More From » jquery

 Answers
20

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.


[#96568] Thursday, June 3, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hasancolec

Total Points: 603
Total Questions: 95
Total Answers: 98

Location: South Korea
Member since Sat, Oct 2, 2021
3 Years ago
;