forked from madrobby/zepto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
touch_functional.html
38 lines (36 loc) · 960 Bytes
/
touch_functional.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Zepto touch functional test</title>
<meta name="viewport" content="maximum-scale=1,initial-scale=1,user-scalable=0">
<script src="../src/polyfill.js"></script>
<script src="../src/zepto.js"></script>
<script src="../src/event.js"></script>
<script src="../src/touch.js"></script>
</head>
<body>
<h1>Zepto touch functional test</h1>
<div id="touch_test" style="width: 200px; height: 200px; background: #ddd">
touch events test
</div>
<script>
$('#touch_test')
.tap(function(){
$(this).append(' | tap!');
})
.doubleTap(function(){
$(this).append(' | double tap!');
})
.swipe(function(){
$(this).append(' | swipe!');
})
.swipeLeft(function(){
$(this).append(' | swipe left!');
})
.swipeRight(function(){
$(this).append(' | swipe right!');
});
</script>
</body>
</html>