-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
82 lines (67 loc) · 2.01 KB
/
test.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>
<head>
<title>Fluid Slider Test</title>
<link rel='stylesheet' id='fluid-slider' href='dist/fluid-slider.min.css' type='text/css' media='all' />
<script type="text/javascript" src="https://hammerjs.github.io/dist/hammer.min.js"></script>
<script type="text/javascript" src="dist/fluid-slider.min.js"></script>
<script type="text/javascript">
var log = function( message ) {
var debugContainer = document.querySelector( '.debug-container' );
if ( debugContainer ) {
var newMessage = document.createElement( 'p' );
newMessage.innerText = message;
debugContainer.appendChild( newMessage );
}
}
var initSlider = function() {
if ( window.FluidSlider ) {
FluidSlider.init();
log( 'Fluid Slider initialized.' );
}
else {
log( 'Fluid Slider isn\'t loaded.' );
}
}
window.addEventListener( "DOMContentLoaded", function () { log( 'DOM Content loaded' ); } );
window.addEventListener( "DOMContentLoaded", function () { initSlider(); } );
window.addEventListener( "load", function () { log( 'Page loaded' ); } );
</script>
<style type="text/css">
.slider-wrapper,
.slider-wrapper * {
box-sizing: border-box;
}
.slider-item {
background-color: #f3f3f3;
border: solid 2px #ddd;
height: 30vh;
}
</style>
</head>
<body>
<div class="instructions">
Notes:
<ul>
<li>Fluid Slider needs the library Hammer.js to be loaded before being initialized</li>
</ul>
</div>
<hr/>
<h2>One slide per view</h2>
<div class="slider-wrapper" data-slider-navigation-buttons="true" data-slider-navigation-bullets="true">
<div class="slider-viewport">
<div class="slider-container">
<div class="slider-item"> Slider 1 </div>
<div class="slider-item"> Slider 2 </div>
<div class="slider-item"> Slider 3 </div>
<div class="slider-item"> Slider 4 </div>
<div class="slider-item"> Slider 5 </div>
<div class="slider-item"> Slider 6 </div>
</div>
</div>
</div>
<hr/>
<div class="debug-container">
</div>
</body>
</html>