Skip to content

jQuery plugin to get swipe direction, distance and angle.

Notifications You must be signed in to change notification settings

lizacodes/swipe.jquery.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

swipe.jquery.js

A jQuery plugin to get swipe direction, distance, angle and speed on devices with or without touch support.

Usage

$(document).swipe()
	.on('swipeStart', function(e) {
		console.log('Swipe start', e.swipe);
	})
	.on('swipeMove', function(e) {
		console.log('Swipe move', e.swipe);

		// Log mouse position
		console.log(e.originalEvent.pageX, e.originalEvent.pageY);
	})
	.on('swipeEnd', function(e) {
		console.log('Swipe end', e.swipe);
	});

About

jQuery plugin to get swipe direction, distance and angle.

Resources

Stars

Watchers

Forks

Packages

No packages published