jquery Basic Tutorial Fourth Edition p227
$ (document). Ready (function() {$ (functionvar size = Event.type = =) MouseEnter '? 85:75var padding = Event.type = = ' MouseEnter '? 0:5; $ (this). FIND (' img '). Stop (). Animate ({width:size, height:size, Paddingtop: padding, paddingleft:padding}); });});
I'm not quite sure how the Stop method works. The previous misunderstanding is to execute the Stop method before the animation, the animation is not stopped, can be tested, the animation is still executed, has been very confused.
Later view Jqurey API found is the stop the currently-running animation on the matched elements
My understanding is that when mouseenter, there is no animation, it does not matter to stop the animation (do not execute the Stop method), execute the following animate ({...}) The And when the animation is not finished, immediately mouseleave, the stop is executed, immediately stop the current unfinished animation.
The understanding of the. Stop () method of jquery