jquery-touchswipe 介绍
TouchSwipe一款专门为移动设备设计的jquery插件,用于监听单个和多个手指触摸等事件。
jquery-touchswipe特点:
1、监听滑动的4个方向:上、下、左、右;2、监听多个手指收缩还是外张;3、支持单手指或双手指触摸事件;4、支持单击事件touchSwipe对象和它的子对象;5、可定义临界值和最大时间来判断手势的实际滑动;6、滑动事件有4个触发点:“开始”,“移动”,“结束”和“取消”;7、结束事件可以在触摸释放或是达到临界值时触发;8、允许手指刷和页面滚屏;9、可禁止用户通过输入元素(如:按钮、表单、文本框等)触发事件;jquery-touchswipe安装
1、npm
npm install jquery-touchswipe --save
2、Bower
bower install jquery-touchswipe --save
3、将压缩文件添加到你的项目里
<script src="js/jquery.touchSwipe.min.js" type="text/JavaScript"></script>
4、使用
$(function() {
$("#test").swipe( {
//Generic swipe handler for all directions
swipe:function(event,direction,distance,duration,fingerCount,fingerData) {
$(this).text("You swiped " + direction );
}
});
//Set some options later
$("#test").swipe( {fingers:2} );
});
网站地址:http://labs.rampinteractive.co.uk/touchSwipe/demos/index.html
GitHub:https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
网站描述:用于监听单个和多个手指触摸等事件的jquery插件
jquery-touchswipe
官方网站:http://labs.rampinteractive.co.uk/touchSwipe/demos/index.html
小编说
以上是编程之家为你收集整理的jquery-touchswipe全部内容。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。