onMouseOver Jquery news widget
I have revised a jquery box :
http://designer-depot.com/manset/test.html
In <ol></ol>
everything wo开发者_开发技巧rk perfect. But I want to on mouseover <h2>
and abstract news for headline1,2,3 changing.
How can I do this.
Thanks in advance
You need to change the text inside the event handler, for example:
$(document).ready(function() {
$("#headlines ol li").mouseover(function(){
$("#headlines ol li").removeClass("current");
$(this).toggleClass("current");
$("h2", this).text("Whatever you want it to say");
});
});
You should also use an if()
to see what link is hovered, and then change the text depending on the link. You can use the same principle to change the description.
精彩评论