jquery.mobile敲击/滑动事件js

时间:2018-09-11 04:46:56
【文件属性】:
文件名称:jquery.mobile敲击/滑动事件js
文件大小:10KB
文件格式:RAR
更新时间:2018-09-11 04:46:56
滑动/touch 此为滑动事件的js引入文件jquery.mobile.touch.js 配合jquery.*.js声明文件及jquery语法使用 jQuery.Mobile/Touch事件 用户触摸屏幕(页面)时触发 提示:Touch 事件同样适用于桌面电脑:点击鼠标! jQuery Mobile Tap tap 事件在用户敲击某个元素时触发。 下面的例子当

元素上触发 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!"); });


【文件预览】:
jquery.mobile.touch
----jquery.mobile.touch.js(24KB)
----jquery.mobile.touch.min.js(8KB)

网友评论

  • 很不错的资料,有帮助