forked from kmturley/touch-scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (92 loc) · 3.27 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TouchScroll</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/carousel.css" />
<link rel="stylesheet" href="css/viewer.css" />
</head>
<body>
<a href="https://github.com/kmturley/touch-scroll" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<h1>Touch Scroll</h1>
<p>Drag a native browser scroll area around! Works on Chrome (latest), Safari (latest), Firefox (latest), IE8+</p>
<h2>Viewer</h2>
<div class="viewer no-select" id="viewer">
<img src="img/photo.jpg" alt="" draggable="false" id="photo" />
</div>
<h2>Carousel</h2>
<div class="carousel">
<a href="#/carousel/previous/" class="prev" id="prev">◀</a>
<ul id="carousel">
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 1</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 2</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 3</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 4</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 5</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 6</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 7</span>
</a>
</li>
<li>
<a href="#">
<img src="img/photo-small.jpg" alt="" />
<span>Item 8</span>
</a>
</li>
</ul>
<a href="#/carousel/next/" class="next" id="next">▶</a>
</div>
<script src="js/RequestAnimationFrame.js"></script>
<script src="js/TouchScroll.js"></script>
<script>
var viewer = new TouchScroll();
viewer.init({
id: 'viewer',
draggable: true,
wait: false
});
var carousel = new TouchScroll();
carousel.init({
id: 'carousel',
prev: 'prev',
next: 'next',
distance: 200
});
</script>
</body>
</html>