Closed matthew-dean closed 13 years ago
Never mind, I figured out with this line!
$(this).stop().animate({rotate: '-20deg', scale: [1.2, 1.2]}, 'fast', 'easeInOutQuad');
The stop() function did it for me, plus I changed the demo from "-=20deg" to "-20deg". Awesome!!
In CSS3, if I have an animation on hover, to, say, rotate 90 degrees, and I interrupt that animation by moving the mouse away, then hover again before it animates back to zero, then the animation will start from the current position.
Like so:
In your library, what happens instead is that the animation still continues back to zero, but starts a new animation in a queue. That means that if I move my mouse over an element repeatedly, it will start a sequence of unstoppable animations. Is there a way to fix this?