forked from electerious/basicSlider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example2.html
82 lines (65 loc) · 1.99 KB
/
example2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- WEBSITE DETAIL -->
<title>hSlider Demo</title>
<meta name="theme-color" content="#00aadc">
<meta name="description" content="A Responsive & Touch-friendly Javascript Slider, only 2.3 KB gzipped.">
<!-- STYLESHEET -->
<link rel="stylesheet" href="https://cdn.pixelstudio.id/css/normalize.css">
<link rel="stylesheet" href="dist/h-slider.css">
<style>
main {
padding: 3rem 10px;
max-width: 960px;
margin: 0 auto;
}
a {
display: block;
}
img {
width: 100%;
}
#peek-gallery {
width: 600px;
}
#peek-gallery .hSlider-container {
width: 75%;
}
</style>
</head>
<body>
<main>
<h1>Slider with Peek of Next/Prev Slide</h1>
<div id="peek-gallery">
<a href="https://picsum.photos/600/450?image=583" target="_blank">
<img src="https://picsum.photos/600/450?image=583">
</a>
<a href="https://picsum.photos/600/450?image=440" target="_blank">
<img src="https://picsum.photos/600/450?image=440">
</a>
<a href="https://picsum.photos/600/450?image=375" target="_blank">
<img src="https://picsum.photos/600/450?image=375">
</a>
<a href="https://picsum.photos/600/450?image=216" target="_blank">
<img src="https://picsum.photos/600/450?image=216">
</a>
<a href="https://picsum.photos/600/450?image=175" target="_blank">
<img src="https://picsum.photos/600/450?image=175">
</a>
</div>
</main>
<!-- <script src="src/basicSlider.js"></script> -->
<script src="src/h-slider.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
let peek = document.querySelector('#peek-gallery');
// basicSlider.create( peek, peekContent, { index: 2, arrows: true } );
hSlider( peek, { index: 2, arrows: true, dots: true } );
});
</script>
</body>
</html>