一、touch.js
1、引用链接:
<script src="https://cdn.bootcss.com/touchjs/0.2.14/touch.min.js"></script>
2、使用方式:
//加载事件
$(function () {
touch.on('.flows', 'hold tap doubletap', function (ev) {
alert("单击tap,双击doubletap,长按hold");
});
});
3、绑定多个并且参数传递:
//加载事件 $(function () { touch.on('.flows', 'hold', function (ev) { alert("uid:" + $(this).data("uid"));//获取data-属性 data-uid="<%#Eval("ID")%>" }); });