javascript - What plug-in do you use for mobile touch events?
某草草2017-05-16 13:37:06
0
7
523
Is there any plug-in that can achieve this effect better? This is a ul. The content beyond the ul can be slid left and right, whichever tab is clicked, which tab slides to the middle.
If you don’t need a plug-in to implement it, use p+float. The parent container gives width: 1000px, overflow: auto, and just beautify the scroll bar. I hope you will adopt it
Try swiper.js. It specializes in carousel events. Various effects are already built-in. In addition, if you want to make a single page slide on the first screen of the mobile terminal, you can try zepto.fullPage.js. As for the touch events on the mobile side, zepto.js itself also has some basic built-in ones. If you need more advanced ones, you can use hammer.js or AlloyFinger.js
I feel like you can refer to Tmall’s must-grab modules for this module. Check out Alibaba’s open source solution Flexible to see if there are any corresponding tutorials
This effect is actually a carousel, you can try swiper.js [http://www.swiper.com.cn/]
Mobile version: http://hammerjs.github.io/
desktop: I have never seen this effect
If you don’t need a plug-in to implement it, use p+float. The parent container gives width: 1000px, overflow: auto, and just beautify the scroll bar. I hope you will adopt it
Try swiper.js. It specializes in carousel events. Various effects are already built-in.
In addition, if you want to make a single page slide on the first screen of the mobile terminal, you can try zepto.fullPage.js.
As for the touch events on the mobile side, zepto.js itself also has some basic built-in ones. If you need more advanced ones, you can use hammer.js or AlloyFinger.js
I feel like you can refer to Tmall’s must-grab modules for this module. Check out Alibaba’s open source solution Flexible to see if there are any corresponding tutorials
You can write your own~ It is recommended to use swiper.js for carousel, fullpage.js and slider.js. Use whichever one you like
Swiper has done it, and the touch event in html5 can also be implemented