May 2017
Intermediate to advanced
448 pages
10h 10m
English
Because the .stop() method, by default, halts animations at their current position, it can lead to surprising results when used with shorthand animation methods. Before animating, these shorthand methods determine the final value and then animate to that value. For example, if .slideDown() is halted with .stop() midway through its animation and then .slideUp() is called, the next time .slideDown() is called on the element, it will only slide down to the height at which it stopped the previous time. To mitigate this type of problem, the .stop() method can accept two Boolean (true/false) arguments, the second of which is known as goToEnd. If we set this argument to true, the current animation not only stops, ...
Read now
Unlock full access