jQuery Mobile swipeleft事件
定义和用法
swipeleft 事件是指在一秒内水平向左拖拽大于30px(垂直方向拖拽小于75px)时触发。
相关事件:
- swipe - 指在一秒内,水平方向拖拽大于30px或垂直方向拖拽小于75px时触发的事件。
- swiperight - 指在一秒内,水平方向向右拖拽大于30px时触发的事件。
语法
$("selector").on("swipeleft",function(event){...})
参数 | 描述 |
---|---|
function(event) | 必须。指定 swipeleft 事件触发时执行的函数。 该函数有可选的事件对象,事件对象可以是任何 jQuery 事件属性 (例如 event.target, event.type, 等)。更多信息请查阅jQuery 事件参考手册。 |

更多实例
事件对象
使用event.target 属性返回swipeleft事件触发的DOM元素。