-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path2_0_event.html
73 lines (70 loc) · 2.58 KB
/
2_0_event.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>Event</title>
<link rel="stylesheet" href="../dist/do-slide.min.css">
<link rel="stylesheet" href="css/common.css">
</head>
<body>
<div class="wrap ds-parent">
<div class="ds-container container">
<div class="section">
<span class="arrow down"></span>
</div>
<div class="section">
<span class="arrow down"></span>
<span class="arrow up"></span>
</div>
<div class="section">
<span class="arrow down"></span>
<span class="arrow up"></span>
</div>
<div class="section">
<span class="arrow up"></span>
</div>
</div>
</div>
<script type="text/javascript" src="../dist/do-slide.min.js"></script>
<script type="text/javascript">
var slide = new DoSlide('.container')
slide.onBeforeChange(function(curIndex, tarIndex, cur, tar) {
console.log('onBeforeChange', {
curIndex: curIndex,
tarIndex: tarIndex,
cur: cur,
tar: tar,
this: this
})
}).onChanged(function(curIndex, lastIndex, cur, last) {
console.log('onChanged', {
curIndex: curIndex,
lastIndex: lastIndex,
cur: cur,
last: last,
this: this
})
}).onOverRange(function(curIndex, tarIndex, cur) {
console.log('onOverRange', {
curIndex: curIndex,
tarIndex: tarIndex,
cur: cur,
this: this
})
}).onUserMouseWheel(function(direction) {
console.log('onUserMouseWheel', {
direction: direction,
this: this
})
}).onUserSwipe(function(direction) {
console.log('onUserSwipe', {
direction: direction,
this: this
})
})
</script>
</body>
</html>