Learn all about the jQuery function .finish().
.finish() is called on an element, the currently-running animation and all queued animations (if any) immediately stop and their CSS properties set to their target values. All queued animations are removed.
If the first argument is provided, only the animations in the queue represented by that string will be stopped.
.finish() method is similar to
.stop(true, true) in that it clears the queue and the current animation jumps to its end value. It differs, however, in that
.finish() also causes the CSS property of all queued animations to jump to their end values, as well.
Animations may be stopped globally by setting the property
true. When this is done, all animation methods will immediately set elements to their final state when called, rather than displaying an effect.