© 1999-2048 dssz.net 粤ICP备11031372号
元素上触发 tap 事件时,隐藏当前
元素: 实例 $("p").on("tap",function(){ $(this).hide(); }); jQuery Mobile Taphold taphold 事件在用户敲击某个元素并保持一秒时被触发: 实例 $("p").on("taphold",function(){ $(this).hide(); }); jQuery Mobile Swipe swipe 事件在用户在某个元素上水平滑动超过 30px 时被触发: 实例 $("p").on("swipe",function(){ $( "span").text("Swipe detected!"); }); jQuery Mobile Swipeleft swipeleft 事件在用户在某个元素上从左滑动超过 30px 时被触发: 实例 $("p").on("swipeleft",function(){ alert("You swiped left!"); }); jQuery Mobile Swiperight swiperight 事件在用户在某个元素上从右滑动超过 30px 时被触发: 实例 $("p").on("swiperight",function(){ alert("You swiped right!"); }); ...展开收缩