jquery.mobile敲击/滑动事件js
此为滑动事件的js引入文件jquery.mobile.touch.js 配合jquery.*.js声明文件及jquery语法使用 jQuery.Mobile/Touch事件 用户触摸屏幕(页面)时触发 提示:Touch 事件同样适用于桌面电脑:点击鼠标! jQuery Mobile Tap tap 事件在用户敲击某个元素时触发。 下面的例子当 <p> 元素上触发 tap 事件时,隐藏当前 <p> 元素: 实例 $("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!"); });
- 1
- junquinchen2016-05-20很不错的资料,有帮助
- 粉丝: 0
- 资源: 2
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助