Skip to content

basecode/WebGestureRecognizers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

a gesture recognizer written in javascript for mouse- and touch-devices.

* beta
* the only gesture that is supported at the moment is a horizontal swipe gesture.
* works in modern browsers.

<script type="text/javascript" src="onUserInteractionMove.js"></script>
<script type="text/javascript" src="gestureRecognizer.js"></script>
<script type="text/javascript" src="swipeGestureRecognizer.js"></script>

var swipeGestureRecognizerCallback;
var selector = ".myElement";

swipeGestureRecognizer(selector, swipeGestureRecognizerCallback);

function swipeGestureRecognizerCallback(obj) {

	if (obj.isSwipeLeft()) {
	}

	if (obj.isSwipeRight()) {
	}

	if (obj.swipeHorizontalCanceled()) {
	}	
}

About

a gesture recognizer written in javascript for mouse- and touch-devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published