开发者

How do I stop this div from fading using jQuery?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜