-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
26 lines (18 loc) · 691 Bytes
/
README
File metadata and controls
26 lines (18 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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()) {
}
}