I'm looking for a good javascript library for gestures (like swipe, tap, doubletap, pinch, etc) for use on mobile browsers. The library should have cross-browser support and should be relatively lightweight.
I'm currently using phone gap with backbone.js and jquery. I've looked into jQuery mobile, Sencha touch, and jGestures plugin, and haven't found one that provides gestures AND works on the key mobile browsers. The closest thing is http://plugins.jquery.com/project/touchSwipe which only works for webkit.
Does anyone have any suggestions? Thanks!
“Hammer is an open-source library that can recognize gestures made by touch, mouse, and pointer events.” – hammerjs.github.io. It is a popular JavaScript library that can be used to build web applications that require performing actions like panning, swiping, rotating, and zooming on touch gestures.
In order to use ZingTouch, the library needs to be integrated into your HTML document first. Subsequently, create a so-called region, which is supposed to react to a certain gesture. Such a region could be any HTML element. var region = ZingTouch.
GestureEvent objects are high-level events that encapsulate the low-level TouchEvent objects. Both GestureEvent and TouchEvent events are sent during a multi-touch sequence. Gesture events contain scaling and rotation information allowing gestures to be combined, if supported by the platform.
Take a look at Alex Gibson's shake, touch and slider plug-ins located at:
Alex Gibson's MiniApps
They are all MIT licensed and will hopefully suit your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With