Recent review of the Code of predecessors, found in the use of animate () in front of the need to add a stop (), to prevent the move out of the flashing problem, but do not know the stop () inside the real meaning of the parameters, today checked the next stop () the meaning of the parameters and the specific use of methods to share to everyone.
Stop (true) is equivalent to stop (TRUE,FALSE): Stops all animation that joins the queue for the selected element.
Stop (true,true): Stops all queued animation of the selected element, but allows the current animation to complete.
Stop () is equivalent to stop (FALSE,FALSE): Stops the current animation of the selected element, but allows all animations of the queue to complete later.
Stop (false,true): Immediately ends the current animation to the final effect, and then completes all subsequent animations of the queue.
$ (selector). Stop (Stopall,gotoend)
StopAll: Optional. Specify whether to stop all animation that joins the queue for the selected element.
Gotoend: Optional. Specify whether the current animation is allowed to complete. This parameter can only be used when the StopAll parameter is set.
The first parameter means whether to empty the animation sequence, that is, to stop the animation effect of the current element or to stop all animation effects that come with it, generally false, skip the current animation effect, and perform the next animation effect;
The second argument is whether the current animation effect is performed to the end, meaning that the animation effect is just half done when the current animation is stopped, and this is true if the desired animation is performed. Otherwise, the animation effect stops at stop execution.
Here is a small example from the Internet, enough to help you understand the use of stop ().