-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
127 lines (104 loc) · 3.32 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>vanillaSlider</title>
<script>
document.documentElement.className = 'js';
window.addEventListener('error', function(e) {
document.documentElement.className = 'badjs'
});
</script>
<link rel="stylesheet" type="text/css" href="css/vanillaslider.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<h1>Vanilla Slider</h1>
<p>
A simple accessible Vanilla JS based slider/carousel.
<a href="https://github.com/cthedot/vanillaSlider">https://github.com/cthedot/vanillaSlider</a>
</p>
<h2>Default</h2>
<p>Rotation, Autoplay, Navigation, Status, no explicit <code>id</code></p>
<div class="vslider vslider-default">
<div>1
<br>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
<h2>Simple</h2>
<p>Navigation off, Status off, Autoplay off but Wheelnavigation On. Custom navigation: <code>slider.prev() slider.next(index)</code></p>
<div class="custom-nav">
<button type="button" id="custom-prev">prev</button>
<input type="number" id="custom-input" placeholder="index">
<button type="button" id="custom-next">next</button>
</div>
<div class="vslider" id="vslider-base">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
<h2>Autoplay off</h2>
<p>Custom timing (1<sup>st</sup> and following) plus custom i18n labels</p>
<div class="vslider" id="vslider-noautoplay">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
<h2>Rotation off</h2>
<p>Implicitly no Autoplay. Custom timing (1<sup>st</sup> and following)</p>
<div class="vslider" id="vslider-norotation">
<div>1 start</div>
<div>2</div>
<div>3 end</div>
</div>
<h2>Rotation off, Autoplay <i>on explicitly</i></h2>
<p></p>
<div class="vslider" id="vslider-norotation-autoplay">
<div>1 start</div>
<div>2</div>
<div>3 end</div>
</div>
<h2>Explicit height. Custom Status.</h2>
<p>Height as number (=px) or string <code>5em</code>. Prev/Next custom styles</p>
<div class="vslider vslider-customstatus" id="vslider-custom">
<div>1</div>
<div>2
<br/>2</div>
<div>3</div>
<div>4</div>
</div>
<h2>With Images</h2>
<p>Auto height which uses <b>first</b> item height, should wait for images to load and use that height!</p>
<div class="vslider vslider-images" id="vslider-images">
<div>
<img alt="1" src="image/1.jpg">
</div>
<div>
<img alt="2" src="image/2.jpg">
</div>
<div>
<img alt="3" src="image/3.jpg">
</div>
</div>
<h2>Background Images</h2>
<p>Custom elements too. Vertical Swipenavigation</p>
<div class="vslider vslider-background" id="vslider-background">
<span style="background-image: url(image/1.jpg)">1</span>
<span style="background-image: url(image/2.jpg)">2</span>
<span style="background-image: url(image/3.jpg)">3</span>
</div>
<h2>Default but custom CSS animation</h2>
<div class="vslider vslider-default vslider-trans">
<div style="background-image: url(image/1.jpg)">1</div>
<div style="background-image: url(image/2.jpg)">2</div>
<div style="background-image: url(image/3.jpg)">3</div>
</div>
<script src="js/vanillaslider.js"></script>
<script src="js/script.js"></script>
</body>
</html>