-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
43 lines (37 loc) · 1.06 KB
/
example.html
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery simple swipe</title>
<style>
* { margin: 0; padding: 0 }
.box { width: 100px; height: 100px; background: tomato; margin: 100px; }
.is-draggable {
transition: transform 250ms ease-in;
}
.is-dragging {
transition-property: none !important;
cursor: move !important;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<div class="box"></div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="jquery.simple.swipe.js"></script>
<script>
jQuery(document).ready(function($) {
$('.box').simpleSwipe({
onComplete: function(direction){
console.log(direction);
},
moveBack: true
});
});
</script>
</body>
</html>