This is possible on jQuery Mobile, but you will need to use a third-party implementation called hammer.js .
It supports a large number of gestures, such as:
- hold
- click
- Doubletap
- drag, dragstart, dragend, dragup, dragdown, dragleft, dragright
- swipes, swipeup, swipedown, swipeleft, swiperight
- transform, transformstart, transformend
- Rotate
- pinch, pinchin, pinchout
- touch (gesture detection starts)
- release (gesture definition is completed)
Example:
$('#test_el').hammer().on("pinchin", ".nested_el", function(event) { console.log(this, event); }); $('#test_el').hammer().on("pinchout", ".nested_el", function(event) { console.log(this, event); });
It works with jQuery Mobile, and this is important. But you should think of some other idea, or at least a different idea for Android 2.X devices, because this platform does not support multitouch events.
There are also some other third-party implementations, such as Touchy . Unfortunately, Touchy only supports a pinch.
source share