-
Notifications
You must be signed in to change notification settings - Fork 2
/
examples.html
160 lines (140 loc) · 3.25 KB
/
examples.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Message Carousel jQuery Plugin — Examples</title>
<style type="text/css">
.container {
margin: 0 auto;
width: 800px;
}
.carousel {
position: relative;
}
.carousel ol {
list-style: none;
margin: 0;
padding: 0;
}
.carousel .slides li {
width: 800px;
height: 400px;
}
.carousel .arrow {
position: absolute;
display: block;
width: 0;
height: 0;
top: 150px;
padding: 0;
cursor: pointer;
text-indent: -5000%;
background: transparent;
border: none;
}
.carousel .arrow.previous {
left: 10px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-right: 50px solid black;
}
.carousel .arrow.next {
right: 10px;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 50px solid black;
}
.carousel .arrow.disabled {
opacity: .3;
cursor: default;
}
.carousel .indicators {
position: absolute;
display: block;
bottom: 20px;
left: 20px;
cursor: pointer;
}
.carousel .indicators li {
display: block;
float: left;
width: 20px;
height: 20px;
margin-right: 20px;
background: black;
opacity: 0.3;
border-radius: 99999px;
-webkit-border-radius: 99999px;
-moz-border-radius: 99999px;
-o-border-radius: 99999px;
-ms-border-radius: 99999px;
}
.carousel .indicators li.active {
opacity: 1;
}
@media all and (max-width: 800px) {
.container {
width: 100%;
}
}
</style>
<script src="./components/jquery/jquery.min.js"></script>
<script src="./carousel.jquery.js"></script>
<script>
$(function() {
$('.carousel.standard ol').carousel({
arrows: true,
speed : 800
});
$('.carousel.auto ol').carousel({
indicators: true,
interval : 1200,
speed : 300,
onInteraction: function(e) {
e.carousel('stgrgrgrop');
}
});
$('.carousel.auto-stop-at-end ol').carousel({
arrows : true,
indicators: true,
interval : 1000,
speed : 300,
onComplete: function(e) {
e.carousel('stop');
}
});
});
</script>
</head>
<body>
<div class="container">
<h1>Message Carousel Examples</h1>
<h2>Standard sliding carousel, slow speed, arrows</h2>
<div class="carousel standard">
<ol class="slides">
<li style="background: red;"></li>
<li style="background: blue;"></li>
<li style="background: green;"></li>
</ol>
</div>
<h2>Automatic sliding carousel, indicators, stops on interaction</h2>
<div class="carousel auto">
<ol class="slides">
<li style="background: red;"></li>
<li style="background: blue;"></li>
<li style="background: green;"></li>
<li style="background: yellow;"></li>
<li style="background: orange;"></li>
</ol>
</div>
<h2>Automatic sliding carousel, indicators & arrows, stops at the end</h2>
<div class="carousel auto-stop-at-end">
<ol class="slides">
<li style="background: red;"></li>
<li style="background: blue;"></li>
<li style="background: green;"></li>
</ol>
</div>
</div>
</body>
</html>