开发者

How do I get this code to animate smoothly in all browsers, using JQuery?

I have a quick question...why does this code do a zig-zag animation, see code:

$('.photos li img').click(function(){   
    var offset = $(this).offset();
    offset.left -= 40;
    offset.top -= 57;

    $('html, b开发者_如何学Pythonody').animate({
        scrollTop: offset.top ,
        scrollLeft: offset.left
    });
});

I'm working on a portfolio site and the animation only works smoothly in Firefox & Chrome...Is there another way to make it animate smoothly in all browsers?

Any help is greatly appreciated, Thanks


You can try adjusting the frame rate.

The animation sequence is moving the objects faster than the browser can display them. IE is quite slow.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜