forked from thebird/Swipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (63 loc) · 2.01 KB
/
index.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
74
75
76
77
78
79
<!DOCTYPE HTML>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'/>
<link href='style.css' rel='stylesheet'/>
</head>
<body>
<h1>Swipe</h1>
<h2>150px wide</h2>
<div id='slider' class='swipe' style='width:150px'>
<ul>
<li style='display:block'><div>1</div></li>
<li style='display:none'><div>2</div></li>
<li style='display:none'><div>3</div></li>
<li style='display:none'><div>4</div></li>
<li style='display:none'><div>5</div></li>
</ul>
</div>
<h2>250px wide</h2>
<div id='slider2' class='swipe' style='width:250px'>
<ul>
<li style='display:block'><div>1</div></li>
<li style='display:none'><div>2</div></li>
<li style='display:none'><div>3</div></li>
<li style='display:none'><div>4</div></li>
<li style='display:none'><div>5</div></li>
</ul>
</div>
<h2>Full width</h2>
<div id='slider3' class='swipe'>
<ul>
<li style='display:block'><div>1</div></li>
<li style='display:none'><div>2</div></li>
<li style='display:none'><div>3</div></li>
<li style='display:none'><div>4</div></li>
<li style='display:none'><div>5</div></li>
</ul>
</div>
<a href='#' onclick='slider3.prev();return false;'>prev</a>
<a href='#' onclick='slider3.next();return false;'>next</a>
<br><br>
<h2>Arbitrary Elements</h2>
<div id='slider4' class='swipe'>
<div>
<div style='display:block'><div>1</div></div>
<div style='display:none'><div>2</div></div>
<div style='display:none'><div>3</div></div>
<div style='display:none'><div>4</div></div>
<div style='display:none'><div>5</div></div>
</div>
</div>
<a href='#' onclick='slider4.prev();return false;'>prev</a>
<a href='#' onclick='slider4.next();return false;'>next</a>
<br><br>
<script src='swipe.js'></script>
<script>
new Swipe(document.getElementById('slider'));
new Swipe(document.getElementById('slider2'));
var slider3 = new Swipe(document.getElementById('slider3'));
var slider4 = new Swipe(document.getElementById('slider4'));
</script>
</body>
</html>