开发者

onMouseOver Jquery news widget

开发者 https://www.devze.com 2022-12-15 02:05 出处:网络
I haverevised 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

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.

0

精彩评论

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