开发者

How do I stop this div from fading using jQuery?

开发者 https://www.devze.com 2023-04-13 03:06 出处:网络
I\'m a beginner with jquery, so this will probably be easy for most of you. I pasted my code in jsFiddle so it\'s easy to understand.

I'm a beginner with jquery, so this will probably be easy for most of you. I pasted my code in jsFiddle so it's easy to understand.

http://jsfiddle.net/Zn6tM/

After clicking the second image (Yahoo), I want the #textholder div to fade in just like the Yahoo image fade开发者_如何学God in after clicking the Google image. Instead, it's fading it directly after Yahoo.

How can I click the Yahoo image, and then the #textholder div fades in after clicking?


You weren't handling the click event on the yahoo image. You were just running the fadeIn directly after the yahoo-fadeIn had finished.

Give this a try...

http://jsfiddle.net/K63nS/ -- sorry my first fiddle didn't save for some reason. This one should be good.

http://jsfiddle.net/K63nS/1/ - yahoo fades out before div fades in.

0

精彩评论

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

关注公众号