使这个插件能够在桌面上滑动

时间:2015-03-30 09:35:41

标签: javascript jquery zepto

我找到了这个轻巧而优秀的滑块插件 https://raw.githubusercontent.com/ximan/swipeSlide/master/js/swipeSlide.js 这在移动设备上运行良好,但我也希望它能够在桌面上滑动。

然后在swipeSlide.js中,

我将此var events = ['touchstart','touchmove','touchend'];替换为此var events = ['mousedown','mousemove','mouseup']; 但行为不对。

DEMO是here,要看它正常工作你必须切换到移动模式(使用chrome检查工具)

0 个答案:

没有答案