After a style is changed with animate, css control will be ineffective.

Source: Internet
Author: User

After a style is changed with animate, css control will be ineffective.

I wrote a movement on the mobile end a few days ago (the Code of this movement I pasted on this: http://www.cnblogs.com/weiman/p/6600380.html) and then found this problem, as shown below:

This is the case before exercise. You can move the menu bar right or left:

 

After the slide stops, let the element position move to a certain position after a certain period of time using animate,

 

If you click the tip:

My sharp corners also follow motion. When sliding to the rightmost side, I click the sharp corner and find that the position of the sharp corner is not controlled;

 

Later, I found out that I used the animation to move the sharp corner, and then the movement controlled by css () is not stopped after I click it, the first solution I came up with was to click it and use animate to control it back. Then I found that there was a flash because it was a motion event. There was a process, and then I was modifying the css () added. stop () to stop the motion to solve this problem;

As follows:

$ (". Fa" pai.stop().css ("left", fa_first_left );

 

Related Article

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.