Plug-in conflicts (sliding conflicts) when iscroll.js and swiper.js are used together

Source: Internet
Author: User

Above, is a mobile phone side of a sliding refresh effect. With the Scroll.js plugin.

There is another slide in each item that is left and right sliding with the Swiper.js plugin to view information for each class.

When the hand starts sliding from the swiper, the whole scroll is very insensitive. All kinds of debugging, all kinds of alert finally put the problem in Swiper.js touchend.

The touchend did not bubble to the scroll, but Touchstart,toucnmove was bubbling to the scroll.

Looking for a long time did not find where to stop the bubble. Finally think of a way, is in the Swiper touchend to increase the use of scroll touchend.

Finally, add the following code to the Sweiper.jquery.js.

Myscroll is an instantiated object that Iscroll is running. _end () is an event that is triggered by an instance touchend.

As for the source code can be downloaded from my git:

Https://github.com/guoyansi/jsUI

Plug-in conflicts (sliding conflicts) when iscroll.js and swiper.js are used together

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.