forked from GoBoldlyForward/turntable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
403 lines (365 loc) · 18.3 KB
/
Copy pathindex.html
File metadata and controls
403 lines (365 loc) · 18.3 KB
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Turntable.js : A Responsive JQuery Slider</title>
<meta property="og:title" content="Turntable.js : A Responsive JQuery Slider" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://polarnotion.github.io/turntable/" />
<meta property="og:image" content="images/planter/plant1.JPG" />
<meta name="google-site-verification" content="rrLjNoBESI8UKXj3nZ79HxzRJYATv1fHn4rhxATkpEo" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<nav class="navbar navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://polarnotion.github.io/turntable/">Turntable.js</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://www.producthunt.com/tech/turntable-js" target="_blank"><i class="fa fa-product-hunt"></i> Upvote</a>
</li>
<li>
<a href="#install">Install</a>
</li>
<a href="Turntable.zip" class="btn btn-white-outline navbar-btn">Try it!</a>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<header class="pad-section position-9">
<div class="container">
<div class="container-center text-center">
<h1 class="text-color">Turntable.js 2.0<br>Responsive JQuery Slider</h1>
<em class="text-color lead">"a flipbook made with Javascript"</em>
</div>
<br>
<div class="turntable-container">
<div id="turntable_1" class="turntable">
<ul>
<li data-img-src="images/planter/plant1.JPG"></li>
<li data-img-src="images/planter/plant2.JPG"></li>
<li data-img-src="images/planter/plant3.JPG"></li>
<li data-img-src="images/planter/plant4.JPG"></li>
<li data-img-src="images/planter/plant5.JPG"></li>
<li data-img-src="images/planter/plant6.JPG"></li>
<li data-img-src="images/planter/plant7.JPG"></li>
<li data-img-src="images/planter/plant8.JPG"></li>
<li data-img-src="images/planter/plant9.JPG"></li>
<li data-img-src="images/planter/plant10.JPG"></li>
<li data-img-src="images/planter/plant11.JPG"></li>
<li data-img-src="images/planter/plant12.JPG"></li>
<li data-img-src="images/planter/plant13.JPG"></li>
<li data-img-src="images/planter/plant14.JPG"></li>
<li data-img-src="images/planter/plant15.JPG"></li>
<li data-img-src="images/planter/plant16.JPG"></li>
<li data-img-src="images/planter/plant17.JPG"></li>
<li data-img-src="images/planter/plant18.JPG"></li>
<li data-img-src="images/planter/plant19.JPG"></li>
<li data-img-src="images/planter/plant20.JPG"></li>
<li data-img-src="images/planter/plant21.JPG"></li>
<li data-img-src="images/planter/plant22.JPG"></li>
<li data-img-src="images/planter/plant23.JPG"></li>
<li data-img-src="images/planter/plant24.JPG"></li>
<li data-img-src="images/planter/plant25.JPG"></li>
<li data-img-src="images/planter/plant26.JPG"></li>
<li data-img-src="images/planter/plant27.JPG"></li>
<li data-img-src="images/planter/plant28.JPG"></li>
<li data-img-src="images/planter/plant1.JPG"></li>
</ul>
</div>
</div>
</div>
</header>
<section id="new" class="pad-section background-white position-99">
<div class="container">
<h2 id="examples">What's <em>new</em> in Version 2.0</h2>
<p class="lead">Our goal with Turntable.js is to shake-up the standard approach to web sliders, JQuery sliders, and image viewers. The average JQuery slider is clunky and relys on the 'click' behavior. Knowing how precious user clicks are, our slider leverages gesture behaviors, requiring little 'commitment' from the viewers. Version 2.0 builds on the previous cursor/finger movements and add support for triggering the slider on scroll. Scroll down to see the example below in action.</p>
<div class="turntable-container">
<div class="header-overlay turntable" id="turntable_2">
<ul>
<li data-img-src="images/planter/plant1.JPG"></li>
<li data-img-src="images/planter/plant2.JPG"></li>
<li data-img-src="images/planter/plant3.JPG"></li>
<li data-img-src="images/planter/plant4.JPG"></li>
<li data-img-src="images/planter/plant5.JPG"></li>
<li data-img-src="images/planter/plant6.JPG"></li>
<li data-img-src="images/planter/plant7.JPG"></li>
<li data-img-src="images/planter/plant8.JPG"></li>
<li data-img-src="images/planter/plant9.JPG"></li>
<li data-img-src="images/planter/plant10.JPG"></li>
<li data-img-src="images/planter/plant11.JPG"></li>
<li data-img-src="images/planter/plant12.JPG"></li>
<li data-img-src="images/planter/plant13.JPG"></li>
<li data-img-src="images/planter/plant14.JPG"></li>
<li data-img-src="images/planter/plant15.JPG"></li>
<li data-img-src="images/planter/plant16.JPG"></li>
<li data-img-src="images/planter/plant17.JPG"></li>
<li data-img-src="images/planter/plant18.JPG"></li>
<li data-img-src="images/planter/plant19.JPG"></li>
<li data-img-src="images/planter/plant20.JPG"></li>
<li data-img-src="images/planter/plant21.JPG"></li>
<li data-img-src="images/planter/plant22.JPG"></li>
<li data-img-src="images/planter/plant23.JPG"></li>
<li data-img-src="images/planter/plant24.JPG"></li>
<li data-img-src="images/planter/plant25.JPG"></li>
<li data-img-src="images/planter/plant26.JPG"></li>
<li data-img-src="images/planter/plant27.JPG"></li>
<li data-img-src="images/planter/plant28.JPG"></li>
<li data-img-src="images/planter/plant1.JPG"></li>
</ul>
</div>
</div>
<h2 id="examples">What is this?</h2>
<p class="lead">Turntable.js is a responsive JQuery slider that will let you rotate through a list of images as your mouse (or finger) sweeps across a container. Think of it like a flipbook made with Javascript, instead of paper. All you need is a set of images, and jQuery.</p>
<p class="lead">
It's a fresh alternative to the typical 'click-to-slide' JQuery gallery, plus the slider works on mobile!
</p>
<h2 id="install">Installation</h2>
<p class="lead">Installing the slider is fairly simple. <b>Download Turntable.js</b> and include turntable.min.js in your javascript file or at the bottom of your html document, and <b>call the turntable function</b> on whatever list of images you want to flip through. Oh, and don't forget the CSS. We've included a minified file, or you can just copy and paste the CSS here into your custom stylesheet. Easy peasy.</p>
<p class="">Also, while it might go without saying, since this is a <em>JQuery</em> slider, but you will need to make sure JQuery is properly installed. If you try to initialize the slider without JQuery, it won't work.</p>
<div>
<!-- Nav tabs -->
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active">
<a href="#html" aria-controls="home" role="tab" data-toggle="tab">HTML</a>
</li>
<li role="presentation">
<a href="#js" aria-controls="profile" role="tab" data-toggle="tab">JS</a>
</li>
<li role="presentation">
<a href="#css" aria-controls="profile" role="tab" data-toggle="tab">CSS</a>
</li>
</ul>
<br>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="html">
<pre class="prettyprint pad">
<div id="myTurntable" class="turntable">
<ul>
<li data-img-src="images/myPic1.jpg"></li>
<li data-img-src="images/myPic2.jpg"></li>
<li data-img-src="images/myPic3.jpg"></li>
<li data-img-src="images/myPic4.jpg"></li>
<li data-img-src="images/myPic5.jpg"></li>
<li data-img-src="images/myPic6.jpg"></li>
<li data-img-src="images/myPic7.jpg"></li>
<li data-img-src="images/myPic8.jpg"></li>
<li data-img-src="images/myPic9.jpg"></li>
<li data-img-src="images/myPic10.jpg"></li>
<li data-img-src="images/myPic11.jpg"></li>
<li data-img-src="images/myPic12.jpg"></li>
<li data-img-src="images/myPic13.jpg"></li>
<li data-img-src="images/myPic14.jpg"></li>
</ul>
</div>
</pre>
</div>
<div role="tabpanel" class="tab-pane" id="js">
<pre class="prettyprint pad language-java">
$('#myTurntable').turntable();
</pre>
</div>
<div role="tabpanel" class="tab-pane" id="css">
<pre class="prettyprint pad language-java">
.turntable {
margin: 0px;
}
.turntable ul {
padding: 0px;
margin: 0px;
}
.turntable ul li {
list-style-type: none;
display: none;
}
.turntable ul li img {
width: 100%;
}
.turntable ul li.active {
display: block;
}
</pre>
</div>
</div>
</div>
<h2 id="settings">Settings</h2>
<p class="lead">Turntable.js will accept an object as a parameter. There are three keys you can use to customize the slider. You can decide if you want to flip through the images as your mouse moves along the X or Y axis of the container, or as you scroll down the page using <b>axis</b>. If you want to reverse the direction it goes through the images, pass in <b>reverse: true</b>. You can also decide where the container will start to turn while you scroll down the page. Try playing around with the different options until you find what works best for you. You can pass in the object when you call the plugin like this -</p>
<pre class="prettyprint pad language-java">
$('#mySpinnyContainer').turntable({
axis: 'x, y, or scroll',
reverse: boolean, // true or false, will reverse the array of images
scrollStart: 'top, middle, or bottom', // only necessary if axis = 'scroll'
});
</pre>
<p class="lead">The plugin will default to the X axis if no option is provided.</p>
<br>
<h2>Feedback</h2>
<div class="row">
<div class="col-sm-6">
<p class="lead">We've been blown away by the support this simple JQuery slider has gotten. Check out what others are saying online and join the conversation. If you've found it useful, we'd love to hear from you.</p>
<p class="lead">Find us on Twitter at <a href="https://twitter.com/polarnotion" target="_blank">@polarnotion</a> or <a href="https://twitter.com/morganjlopes" target="_blank">@morganjlopes</a>. Show us what you've built with the slider.</p>
</div>
<div class="col-sm-6">
<blockquote>
"Forget that expensive 3-D rendering, just put a series of images together and you're creating a rather <em>dynamic</em> and wholly <em>immersive experience</em>."
<p class="text-right">
<a href="http://www.websitemagazine.com/content/blogs/posts/archive/2016/04/28/turntable-a-click-to-slide-alternative.aspx#sthash.Q9SEfAg0.gUKsIUtx.dpuf" target="_blank">- websitemagazine.com</a>
</p>
</blockquote>
</div>
</div>
<br>
<ul class="list-inline">
<li>See what people are saying on:</li>
<li>
<a href="https://twitter.com/search?q=turntable.js" target="_blank">
<i class="fa fa-twitter"></i> Twitter
</a>
</li>
<li>
<a href="https://www.facebook.com/search/top/?q=turntable.js" target="_blank">
<i class="fa fa-facebook"></i> Facebook
</a>
</li>
<li>
<a href="https://www.reddit.com/r/web_design/comments/4fhx16/turntablejs_a_responsive_JQuery_slider_that_will/" target="_blank">
<i class="fa fa-reddit-alien"></i> Reddit
</a>
</li>
<li>
<a href="https://www.producthunt.com/tech/turntable-js" target="_blank">
<i class="fa fa-product-hunt"></i> Product Hunt
</a>
</li>
</ul>
<br>
<p>v 2.0</p>
</div>
</section>
<section id="subscription_footer">
<style type="text/css">
#subscription_footer {
padding: 40px;
background-color: #222;
color: white;
}
#subscription_footer label {
color: white;
text-transform: uppercase;
font-size: 12px;
}
#subscription_footer h2 {
color: white;
}
#subscription_footer h2::after {
content: " ";
border-bottom: 1px solid white;
width: 100px;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 20px;
padding-bottom: 10px;
}
#subscription_footer .btn-white-outline.btn-lg {
text-transform: uppercase;
}
#subscription_footer .btn-white-outline.btn-lg:hover,
#subscription_footer .btn-white-outline.btn-lg:active {
color: #222;
text-transform: uppercase;
}
</style>
<div class="container container-md">
<h2 class="text-center">Get more free plugins.</h2>
<p class="text-center text-white lead">Let us send more free stuff, right to your inbox.</p>
<form class="jotform-form" action="https://submit.jotformpro.com/submit/61093322709958/" method="post" name="form_61093322709958" id="61093322709958" accept-charset="utf-8">
<input type="hidden" name="formID" value="61093322709958" />
<div class="form-all">
<div class="form-section page-section">
<!-- <div class="form-line form-group" data-type="control_textbox" id="id_4">
<label class="form-label form-label-top" id="label_4" for="input_4"> Name </label>
<div id="cid_4" class="form-input-wide jf-required">
<input type="text" class="form-control form-textbox" data-type="input-textbox" id="input_4" name="q4_name" size="20" value="" />
</div>
</div> -->
<div class="form-line form-group jf-required" data-type="control_email" id="id_3">
<label class="form-label form-label-top" id="label_3" for="input_3"> Email <span class="form-required"> * </span></label>
<div id="cid_3" class="form-input-wide jf-required">
<input type="email" class="form-control form-textbox validate[required, Email]" id="input_3" name="q3_email3" size="30" value="" />
</div>
</div>
<div class="form-line form-group text-center" data-type="control_button" id="id_2">
<div id="cid_2" class="form-input-wide">
<div class="form-buttons-wrapper">
<button id="input_2" type="submit" class="form-submit-button btn btn-white-outline btn-lg"> Submit </button>
</div>
</div>
</div>
<div style="display:none">
Should be Empty: <input type="text" name="website" value="" />
</div>
</div>
</div>
<input type="hidden" id="simple_spc" name="simple_spc" value="61093322709958" />
<script type="text/javascript"> document.getElementById("si" + "mple" + "_spc").value = "61093322709958-61093322709958"; </script>
</form>
</div>
</section>
<footer class="text-center">
<div class="container">
<iframe src="https://ghbtns.com/github-btn.html?user=polarnotion&repo=turntable&type=star&count=true" frameborder="0" scrolling="0" width="120px" height="20px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=polarnotion&type=follow&count=true&size=small" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
<br>
<br>
<p>
<a href="http://polarnotion.com/?ref=turntable" class="text-white" target="_blank">
Built by Polar Notion
<br>
<em>Go Boldly Forward</em>
</a>
</p>
</div>
</footer>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/main.js"></script>
<script type="text/javascript">
$('#turntable_1').turntable({
axis: 'x',
reverse: true
});
$('#turntable_2').turntable({
axis: 'scroll'
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-33343564-10', 'auto');
ga('send', 'pageview');
</script>
<script src="https://cdn.optimizely.com/js/2773220324.js"></script>
</body>
</html>