jQuery stop() method is very useful for stopping the currently running animation before the finishing of the selected element animation.
General Syntax of animation:
$(selector).stop(stopAll,goToEnd);false
and it denotes whether or not to complete the current animation immediately.
Let us use both optional parameters of the stop()
method and set it to true.