8

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!

Steve
  • 2,108
  • 4
  • 25
  • 36
  • By key browsers do you mean...? If phone does not provide support nothing would work – nLL Sep 11 '11 at 19:42
  • It would be helpful if you could clarify what you consider to be the "key mobile browsers". Is something that targets the [W3C Touch Events Spec](http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html) sufficient? As far as I know, it is currently [only supported by WebKit on iOS & Android](http://www.html5rocks.com/en/mobile/touch.html#toc-device). – daxelrod Sep 11 '11 at 19:43
  • As a followup, it looks like Opera Mobile [supports Touch Events](http://caniuse.com/#search=touch) as well. – daxelrod Sep 13 '11 at 04:44

2 Answers2

3

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.

2

You can checkout Hammer.js on github. It has all the gesture you asked for

Vinod CG
  • 1,041
  • 4
  • 15
  • 24