More detail on built-in event handling in Mobile Safari can be found here
Usage example:
var actions = {
onGestureStart: function(scale, rotation, event){
// do stuff when the event started
},
// don't forget the come after object properties and methods
onGestureChange: function(scale, rotation, e){
// do some more stuff when fingers move
},
onGestureEnd: function(s,r,e){
// called when the fat lady sang... or the gesture is done.
}
};
$('.my_selector').bindGestures(actions);
The parameters that the callback functions receive are:
scale – amount scaled since the gesture started
rotation – amount of rotation. The angle is in degrees, where clockwise is positive and counterclockwise is negative.
event – jQuery event that’s triggered. To acces the original event use event.originalEvent. You can also access the element that has been touched with event.originalEvent.target