2

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, body').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

Nasir
  • 4,785
  • 10
  • 35
  • 39

1 Answers1

0

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.

Community
  • 1
  • 1
Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176