开发者

jQuery fadeIn and fadeOut divs

开发者 https://www.devze.com 2023-03-03 21:31 出处:网络
I have a working version of my code here: http://jsfiddle.net/5Hqs3/24/ As you can see, there is a default message that displays upon arrival. After a few moments, the cycle begins and \"Billing Remi

I have a working version of my code here: http://jsfiddle.net/5Hqs3/24/

As you can see, there is a default message that displays upon arrival. After a few moments, the cycle begins and "Billing Reminders" becomes bold and a billing message is displayed, then Collections, then Payments.

If you hover over one of the links, it displays that message. Works great.

However, I now need to add multiple messages per category so that the active link remains bold, but the 1st message fades away and a 2nd is displayed. Or a 3rd, and so on.

You'll see in the jsfiddle that I've got divs for the second message within开发者_StackOverflow each category that I need the jQuery to cycle through regularly, or when the user hovers over that link.

Any thoughts?


Take a look into the jquery Cycle plugin. This will cycle through a set of tagged elements. So on select/hover you can trigger a cycle element to start playing. There are a host of options available like before/after/onend, etc. So on hover of one of your divs you could trigger a cycle object to start playing. On mouseout you stop the cycle.

0

精彩评论

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