开发者

jquery: animate background position without plugin?

hey guys, I have no luck making a simple background image animation working without the background-position-plugin of protofunc().

I used the plugin before and everything worked fine. However since the 1.6 version of jQuery the plugin is broken and doesn't work anymore.

Is there any chance I can make an easy backgroundPosition Animation without this Plugin?

This is the code I'm using:

    //Com开发者_Go百科ment form
$("#comment").focus(function() {
    $(this).css({"background-color":"#fff"});
    $(this).animate({backgroundPosition: '220% 16px'}, {
        duration: 500,
        easing: 'easeOutQuint',
        complete: function() { }
    });

});


Either revert back to a previous version of jQuery that worked, or set an actual <img>as the background and animate that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜