-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtest.html
executable file
·214 lines (178 loc) · 9.64 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>Carousel with Gallery Thumbs - Bootsnipp.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript">
window.alert = function(){};
var defaultCSS = document.getElementById('bootstrap-css');
function changeCSS(css){
if(css) $('head > link').filter(':first').replaceWith('<link rel="stylesheet" href="'+ css +'" type="text/css" />');
else $('head > link').filter(':first').replaceWith(defaultCSS);
}
$( document ).ready(function() {
var iframe_height = parseInt($('html').height());
window.parent.postMessage( iframe_height, 'https://bootsnipp.com');
});
</script>
<style type="text/css">
.hide-bullets {
list-style:none;
margin-left: -40px;
margin-top:20px;
}
.thumbnail {
padding: 0;
}
.carousel-inner>.item>img, .carousel-inner>.item>a>img {
width: 100%;
}
</style>
</head>
<body>
<div class="container">
<div id="main_area">
<!-- Slider -->
<div class="row">
<div class="col-sm-6" id="slider-thumbs">
<!-- Bottom switcher of slider -->
<ul class="hide-bullets">
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-0">
<img src="http://placehold.it/150x150&text=zero">
</a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-1"><img src="http://placehold.it/150x150&text=1"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-2"><img src="http://placehold.it/150x150&text=2"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-3"><img src="http://placehold.it/150x150&text=3"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-4"><img src="http://placehold.it/150x150&text=4"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-5"><img src="http://placehold.it/150x150&text=5"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-6"><img src="http://placehold.it/150x150&text=6"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-7"><img src="http://placehold.it/150x150&text=7"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-8"><img src="http://placehold.it/150x150&text=8"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-9"><img src="http://placehold.it/150x150&text=9"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-10"><img src="http://placehold.it/150x150&text=10"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-11"><img src="http://placehold.it/150x150&text=11"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-12"><img src="http://placehold.it/150x150&text=12"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-13"><img src="http://placehold.it/150x150&text=13"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-14"><img src="http://placehold.it/150x150&text=14"></a>
</li>
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-15"><img src="http://placehold.it/150x150&text=15"></a>
</li>
</ul>
</div>
<div class="col-sm-6">
<div class="col-xs-12" id="slider">
<!-- Top part of the slider -->
<div class="row">
<div class="col-sm-12" id="carousel-bounding-box">
<div class="carousel slide" id="myCarousel">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item" data-slide-number="0">
<img src="http://placehold.it/470x480&text=zero"></div>
<div class="item" data-slide-number="1">
<img src="http://placehold.it/470x480&text=1"></div>
<div class="item" data-slide-number="2">
<img src="http://placehold.it/470x480&text=2"></div>
<div class="item" data-slide-number="3">
<img src="http://placehold.it/470x480&text=3"></div>
<div class="item" data-slide-number="4">
<img src="http://placehold.it/470x480&text=4"></div>
<div class="item" data-slide-number="5">
<img src="http://placehold.it/470x480&text=5"></div>
<div class="item" data-slide-number="6">
<img src="http://placehold.it/470x480&text=6"></div>
<div class="item" data-slide-number="7">
<img src="http://placehold.it/470x480&text=7"></div>
<div class="item" data-slide-number="8">
<img src="http://placehold.it/470x480&text=8"></div>
<div class="item" data-slide-number="9">
<img src="http://placehold.it/470x480&text=9"></div>
<div class="item" data-slide-number="10">
<img src="http://placehold.it/470x480&text=10"></div>
<div class="item" data-slide-number="11">
<img src="http://placehold.it/470x480&text=11"></div>
<div class="item" data-slide-number="12">
<img src="http://placehold.it/470x480&text=12"></div>
<div class="item" data-slide-number="13">
<img src="http://placehold.it/470x480&text=13"></div>
<div class="item" data-slide-number="14">
<img src="http://placehold.it/470x480&text=14"></div>
<div class="item" data-slide-number="15">
<img src="http://placehold.it/470x480&text=15"></div>
</div>
<!-- Carousel nav -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>
</div>
</div>
</div>
<!--/Slider-->
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#myCarousel').carousel({
interval: 5000
});
//Handles the carousel thumbnails
$('[id^=carousel-selector-]').click(function () {
var id_selector = $(this).attr("id");
try {
var id = /-(\d+)$/.exec(id_selector)[1];
console.log(id_selector, id);
jQuery('#myCarousel').carousel(parseInt(id));
} catch (e) {
console.log('Regex failed!', e);
}
});
// When the carousel slides, auto update the text
$('#myCarousel').on('slid.bs.carousel', function (e) {
var id = $('.item.active').data('slide-number');
$('#carousel-text').html($('#slide-content-'+id).html());
});
});
</script>
</body>
</html>