开发者

How can I animate text colors using jQuery?

$(document).ready(function(){
    $('a.nav_menu')
        .css( {backgroundPosition: "0 0"} )
        .mouseover(function(){
            $(this).animate({
            backgroundPosition:"(-650px 0)",
            'color': '#000000'
        }, {duration:700})
        })
        .mouseout(function(){
            $(this).animate(开发者_如何转开发{backgroundPosition:"(0px 0)"}, {duration:900, complete:function(){
                $(this).css({backgroundPosition: "0 0"})
            }})
        })
});

What is wrong with this? The text color doesn't change.


You need to either use jQuery UI effects or the color animation plugin to animate colors.


You need to use this plugin to animate colours.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜