app-framework学习--Touch事件

监听appframework的Touch事件


Events

1
2
3
4
5
6
7
8
9
tap                  Tap on the element
singleTap            Single tap on the elem (250ms延迟)
doubleTap            双击
longTap              长按
swipe                The element was swiped (30px threshold)
swipeLeft            left
swipeRight           right
swipeUp              up
swipeDown            down


使用方法:

//双击
1
$("#element").bind("doubleTap",function(){
//do some js;
});

//长按
2
$("#element").bind("longTap",function(){
//do some js;
});


.....
2
$("#element").bind("longTap",function(){
//do some js;
});



原文地址:https://www.cnblogs.com/mcdnf/p/5158263.html