change .animate() instead of queue
Hi,
heres my problem...
ive got two images, one is a smaller version of the other. When i move my mouse over the small image, i'm moving a crosshair around on the large image. I've got this all working perfectly but I want to improve it by smoothing the motion of the crosshair.
The problem is that the large image could be any arbitrary % larger, so for example, say its 5x larger...
When i move the mouse 5px on the small image, i get a 25px jump on the large image, which looks nasty. What i'd like to do is smooth this with some animation.
However, because i'm calling $('#crosshair').animate({ left: destX, top: destY}, 100); from the mousemove event of the small image, i get a big queue of 'animate's, and the crosshair jerks around with a massive lag
How can i modify the existing animate(), rather than simply queing up another onmousemove, or is there a completely different (better) way of approaching this whole thing?
Analogously i guess what im looking for is a sort of smoothed mouse-trail type animation script.
Any help would be greately appreciated!
Thanks
Andrew