views:

45

answers:

0

Hi guys,

I'm using the mousemove event handler with jQuery:

$(document).mousemove(function(e) { updateDownloadPosition(e); } );

It works perfectly in Chrome but every other browser I've tried the mousemove event isn't fired until the mouse stops moving, instead of constantly every time it moves.

--EDIT--

Ok so as Tim Down rightly pointed out, its not the mousemove event, its my function, so now my focus is on my animation function:

paralaxArray[i].object.animate(
            {marginLeft: newX},
            {duration: 3000,
            easing: 'easeOutExpo'});

In order to get this to reset properly on mousemove I was using the stop() function:

paralaxArray[i].object.stop().animate(

...but this produces choppy animation in chrome so now I'm using clearQueue:

paralaxArray[i].object.clearQueue();
paralaxArray[i].object.animate(
            {marginLeft: newX},
            {duration: 3000,
            easing: 'easeOutExpo'});

But doing it this way (and with stop() ) causes all browsers other than chrome to only animate once the mouse has stopped moving. What could be causing this?? Am I going to have to write my own animation update function?

Thanks again :)

Thanks