项目作者: redfish-d86e

项目描述 :
jQuery的滑动手势事件插件
高级语言: JavaScript
项目地址: git://github.com/redfish-d86e/touch.git
创建时间: 2015-11-11T04:35:00Z
项目社区:https://github.com/redfish-d86e/touch

开源协议:Apache License 2.0

下载


touch

jQuery的滑动手势事件插件

touch方法接收两个参数:

1.滑动的方向,如:top,bottom,left,right

2.回调方法,事件发生后运行的函数

使用示例:

  1. //向上滑动事件
  2. $("body").touch("top",function(){
  3. console.log("top");
  4. })
  5. //向下滑动事件
  6. $("body").touch("bottom",function(){
  7. console.log("bottom");
  8. })
  9. //向左滑动事件
  10. $("body").touch("left",function(){
  11. console.log("left");
  12. })
  13. //向左滑动事件
  14. $("body").touch("right",function(){
  15. console.log("right");
  16. })