Multiple animation sequences will be queued when performing mouseover
or mouseout
on the element. jQuery provides a way to stop these animations and remove them from the animation queue.
Adding .stop(true)
before .animate()
will
Stop the currently-running animation on the matched elements
The true
parameter will also remove any already queued animations - see Prevent Animation Queue Buildup