Touch.js

Baidu Clouda Event & Gesture Library

极速CDN

<script src="http://code.baidu.com/touch-0.2.14.min.js"></script>

Examples


//swipe example
touch.on('.target', 'swipeleft swiperight', function(ev){
    console.log("you have done", ev.type);
});

               		

See more live examples

Note

Touch.js是移动设备上的手势识别与事件库, 由百度云Clouda团队维护,也是在百度内部广泛使用的开发工具.

Touch.js的代码已托管于github并开源,希望能帮助国内更多的开发者学习和开发出优秀的App产品.

Touch.js手势库专为移动设备设计, 请在Webkit内核浏览器中使用.