jQuery fadeOut works but not fadeIn
Question
this is my code on jsFiddle, when I try doing
$('#featuredStores').fadeOut(1000)
it works, but .fadeIn()
doesn't work, Similarly when I use .slideUp()
it works, but doesn't work when I use .slideDown()
what's the issue here?
Solution
Basically slideDown()
shows the image. Considering your image is already shown when the DOM is rendered, there is nothing to slide down to. If you set the style as display:none
then use slideDown()
, it'll work.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow