How do I get this code to animate smoothly in all browsers, using JQuery?
<p>I have a quick question...why does this code do a zig-zag animation, see code:</p>

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

    $('html, body').animate({
        scrollTop: offset.top ,
        scrollLeft: offset.left
    });
});
</code></pre>

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

<p>Any help is greatly appreciated, Thanks </p>
