基于Jquery扩展在移动端产生的事件,包含,单次触摸事件,两次触摸事件,长按事件,滑屏事件,向上滑动事件,向下滑动事件,向左滑动事件,向右滑动事件
地址预览 https://hangjob.github.io/touchEvent/index.html
$(el).tap
$(el).doubleTap
$(el).longTap
$(el).swipe
$(el).swipeUp
$(el).swipeDown
$(el).swipeLeft
$(el).swipeRight
$('.container').swipeRight((res) => {
ulDom.append(createLi(`向右滑动了${res}px`));
})
$('.container').swipe((x, y) => {
ulDom.append(createLi(`滑屏事件,X轴滑动了${x}px,Y轴滑动了${y}px`));
})
...
扫描公众号,回复:加群 https://www.vipbic.com/weixin.html