Precise application of the Stop () method

Source: Internet
Author: User

The Stop () method plays a great role in animation, and he is able to prevent the accumulation of continuous animation or continuous events, so that the animation in a methodical manner.

1 Grammatical structure

Stop ([clearqueue],[gotoend]);

Both of these parameters are optional, and are both Boolean values (True/false). This way, the Stop () method has 4 combinations. Stop (True,true), Stop (True,false), Stop (false,true), Stop (False,false)

2 Inappropriate memories

Stop (true) is equivalent to stop (TRUE,FALSE): Stops all queued animations of the selected element.

Stop (true,true): Stops all queued animations of the selected element, but allows the current animation to be completed.

Stop () is equivalent to stop (FALSE,FALSE): Stops the current animation of the selected element, but allows all animations of the queue to be completed later.

Stop (false,true): Immediately end the current animation to the final effect, and then complete the queue later so the animation

3 pointer memory

The above explanation is very detailed, but very difficult to remember, because the logic is not good enough, it will occupy more brain memory. But we can use the pointer memory method, just remember the pointer points to the address to be able to ~

Entry Address: Clearqueue represents whether you want to empty an animation queue that has not finished executing

The gotoend represents whether the animation being executed is directly redirected to the end state.

Write here, I hope you do not because things simple and spit groove, when looking for information on the internet is really a bunch of tedious explanations, and finally in the "sharp jquery" to find a simple and clear answer ~ hope to stop () understanding is not thoroughly helpful ~

Precise application of the Stop () method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.