Skip to content

tudormunteanu/jQTouch-Gestures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQTouch extension to recognize multi-touch gestures.

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

About

jQTouch extension to recognize multi-touch gestures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published