How to separate the Click event and swipe event in Jquery mobile?
In my slide show project, user can swipe left or right to show pervious or next image. This is easy by using jquery mobile swipe event on the slide show container. However, user want to append a click event to it, when they click on the image, it will open in a new tab. Therefore I wrap the <img>
tap in <a>
. The problem is when user swipe the picture very quickly, the click event is also be triggered.
$(" .carousel").swiperight(function (e) {
$(this).carousel('prev');
});
$(" .carousel").swipeleft(function (e) {
$(this).carousel('next');
});
How to disable the click event when user swiping image?
链接地址: http://www.djcxy.com/p/78288.html上一篇: 确定显示的条目是listview