开发者

jQuery fadeOut works but not fadeIn

开发者 https://www.devze.com 2023-03-05 05:08 出处:网络
this is my code on jsFiddle, when I try doin开发者_如何学编程g $(\'#featuredStores\').fadeOut(1000)

this is my code on jsFiddle, when I try doin开发者_如何学编程g

$('#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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号