1. 程式人生 > >Zepto中的Swipe事件失效

Zepto中的Swipe事件失效

阻止 spa fun bsp lis ole add swipe事件 pre

需要阻止瀏覽器默認滑動的事件

document.addEventListener(touchmove, function (event) {
    event.preventDefault();
}, false);
$(body).swipeUp(function(){
      console.log(上滑);
});

Zepto中的Swipe事件失效