jquery using Slidedown and Slideup to do two-level menu ideas to solve

Source: Internet
Author: User

The original blog http://caibaojian.com/sliderdown-slideup.html just for his own study

When navigating, you will encounter a mouse move quickly, move quickly, and then you will find that the menu is gradually disappearing, the last move up or even do not show.

Just change the first stop () inside to stop (true,true). The second stop () is removed. or add Stop (true,true) to the second one, and the first one is removed.

Or use a function like this: Change the first stop () to filter (': Not (: Animated) '). The same second one does not need to add stop ().

What is involved in this is actually an animated stop ();

The Stop () method stops the animation that is currently running.
$ (selector). Stop (stopall,gotoend)
StopAll is optional. Specifies whether to stop all queue-join animations for the selected element.
Gotoend is optional. Specifies whether to allow the current animation to be completed. This parameter can only be used when the StopAll parameter is set.

As can be seen from the Stop () above, we have triggered the slidedown () when we have slipped, so that his height naturally completes the current animation and stops the added animation queue.

ulobj.animate ({height: ' Toggle ', opacity: ' Toggle '}, speed);

jquery using Slidedown and Slideup to do two-level menu ideas to solve

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.