使用jQuery检测iPhone Swipe

我只是在寻找能够检测触摸设备上手指滑动的聆听者。

例如;

if (swipe.direction == 'left' ) { function(); } 

使用jQueryMobile,您可以使用多个事件,例如swipe ,甚至swipeleftswiperighttap等。

http://jquerymobile.com/test/docs/api/events.html

处理滑动的更好的插件(如果这就是你想要的)是Touch Swipe。

我发现touchwipe非常垃圾,当你想要的只是这个function时,我总能找到jQueryMobile的方法。

https://github.com/mattbryson/TouchSwipe-Jquery-Plugin