index.html 22 KB
Newer Older
Michael Iseard's avatar
Michael Iseard committed
1
<!doctype html>
Michael Iseard's avatar
Michael Iseard committed
2
<html lang="en">
Michael Iseard's avatar
Michael Iseard committed
3

Michael Iseard's avatar
Michael Iseard committed
4
<head>
Michael Iseard's avatar
Michael Iseard committed
5
6
7
8
9
10
11
12
13
14
15
16
17
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-92977303-2"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', 'UA-92977303-2');
    </script>

Michael Iseard's avatar
Michael Iseard committed
18
19
20
21
22
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
Michael Iseard's avatar
Michael Iseard committed
23
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
Michael Iseard's avatar
Michael Iseard committed
24

Michael Iseard's avatar
Michael Iseard committed
25
    <!-- Citrus-Slider CSS -->
Michael Iseard's avatar
Michael Iseard committed
26
    <link rel="stylesheet" type="text/css" href="css/citrus-slider.min.css?v=1.0.1">
Michael Iseard's avatar
Michael Iseard committed
27
28

    <!-- highlightjs -->
29
    <link rel="stylesheet" href="css/highlightjs.css">
Michael Iseard's avatar
Michael Iseard committed
30

31
    <!-- favicon -->
32
    <link rel="icon" type="image/png" sizes="32x32" href="favicon.ico?v1.1">
Michael Iseard's avatar
tidy up    
Michael Iseard committed
33
34
35

    <!-- OpenSans font -->
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
Michael Iseard's avatar
Michael Iseard committed
36
    <link href="https://fonts.googleapis.com/css?family=Libre+Franklin:400,900" rel="stylesheet">
37
38


Michael Iseard's avatar
Michael Iseard committed
39
    <title>Citrus Slider - A modern JavaScript slider.</title>
40
    <meta property="og:image" content="https://citrus.iseardmedia.com/img/og.png?v2.0.0" />
Michael Iseard's avatar
Michael Iseard committed
41
    <meta property="og:description" content="A modern JavaScript slider with no third party requirements." />
Michael Iseard's avatar
Michael Iseard committed
42
43

    <style>
44
        body {
Michael Iseard's avatar
Michael Iseard committed
45
            font-family: 'Libre Franklin', sans-serif;
46
47
        }

Michael Iseard's avatar
Michael Iseard committed
48
49
        .slide-text h2 {
            font-weight: 900;
50
            text-shadow: 1px 1px 1px #222;
Michael Iseard's avatar
Michael Iseard committed
51
52
        }

Michael Iseard's avatar
Michael Iseard committed
53
54
55
56
57
        .btn-primary,
        .btn-primary:hover,
        .btn-primary:active,
        .btn-primary:visited,
        .btn-primary:focus {
58
59
            background-color: transparent;
            border-color: #fff;
Michael Iseard's avatar
Michael Iseard committed
60
61
        }

62
63
        .btn-primary:not(:disabled):not(.disabled).active,
        .btn-primary:not(:disabled):not(.disabled):active,
Michael Iseard's avatar
tidy up    
Michael Iseard committed
64
        .show>.btn-primary.dropdown-toggle {
65
66
            background-color: transparent;
            border-color: #fff;
67
68
        }

Michael Iseard's avatar
Michael Iseard committed
69
        #intro {
Michael Iseard's avatar
Michael Iseard committed
70
            background-color: #51bfd6;
Michael Iseard's avatar
Michael Iseard committed
71
            color: #fff;
72
            padding-bottom: 264px;
Michael Iseard's avatar
Michael Iseard committed
73
74
75
76
77
78
        }

        #intro hr {
            border-top: 1px solid rgba(255, 255, 255, 0.53);
        }

79
80
81
        #slider-demo-1 {
            margin-top: -232px;
            border: 10px solid #fff;
Michael Iseard's avatar
Michael Iseard committed
82
83
84
85
86
            border-bottom: 0;
        }

        #demo-settings {
            margin-top: 1.5rem;
87
88
        }

89
        #site-footer {
Michael Iseard's avatar
Michael Iseard committed
90
            background-color: #51bfd6;
91
92
93
            color: #fff;
            text-align: center;
            padding: 2em;
Michael Iseard's avatar
Michael Iseard committed
94
        }
Michael Iseard's avatar
Michael Iseard committed
95
    </style>
Michael Iseard's avatar
Michael Iseard committed
96
</head>
Michael Iseard's avatar
Michael Iseard committed
97

Michael Iseard's avatar
Michael Iseard committed
98
<body>
Michael Iseard's avatar
Michael Iseard committed
99

100
    <nav id="main-nav" class="navbar navbar-expand-lg navbar-light">
Michael Iseard's avatar
Michael Iseard committed
101
        <div class="container">
Michael Iseard's avatar
Michael Iseard committed
102
            <img src="img/logo.svg?v1.1" width="30" height="30" class="d-inline-block align-top" alt="">
103
104
105
106
107
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
Michael Iseard's avatar
Michael Iseard committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item">
                        <a class="nav-item nav-link" href="#installation">Installation</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-item nav-link" href="#settings">Settings</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-item nav-link" href="#methods">Methods</a>
                    </li>
                </ul>
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-item nav-link" href="https://www.iseardmedia.com">Iseard Media</a>
                    </li>
                    <li class="nav-item">
Michael Iseard's avatar
Michael Iseard committed
124
                        <a class="nav-item nav-link" href="https://github.com/mikey242">Git</a>
Michael Iseard's avatar
Michael Iseard committed
125
126
127
                    </li>
                </ul>
            </div>
128
        </div>
Michael Iseard's avatar
Michael Iseard committed
129
    </nav>
Michael Iseard's avatar
Michael Iseard committed
130
    <div id="intro" class="jumbotron jumbotron-fluid">
Michael Iseard's avatar
Michael Iseard committed
131
        <div class="container">
Michael Iseard's avatar
Michael Iseard committed
132
133
            <div class="row align-items-center justify-content-center">
                <div class="col-8">
Michael Iseard's avatar
Michael Iseard committed
134
                    <h1 class="display-3" style="font-weight: 900;">
Michael Iseard's avatar
Michael Iseard committed
135
                        Citrus Slider</h1>
Michael Iseard's avatar
Michael Iseard committed
136
                    <p class="lead">A modern JavaScript slider with no third party requirements.</p>
Michael Iseard's avatar
Michael Iseard committed
137
138
                    <hr class="my-4">
                    <p class="lead">
Michael Iseard's avatar
Michael Iseard committed
139
                        <a class="btn btn-primary btn-lg" href="https://github.com/mikey242/citrus-slider/releases/download/v1.0.1/citrus-1.0.1.zip" role="button">Download</a>
Michael Iseard's avatar
Michael Iseard committed
140
                        <a class="btn btn-primary btn-lg" href="https://github.com/mikey242/citrus-slider" role="button">Source</a>
Michael Iseard's avatar
Michael Iseard committed
141
                    </p>
Michael Iseard's avatar
Michael Iseard committed
142
                    <span>v1.0.1
143
144
                        <span class="badge badge-danger">beta</span>
                    </span>
Michael Iseard's avatar
Michael Iseard committed
145
146
                </div>
                <div class="col d-none d-lg-block">
147
                    <img src="img/logo.svg?v1.1" width="300px" height="300px" class="d-inline-block align-top" alt="">
Michael Iseard's avatar
Michael Iseard committed
148
149
                </div>
            </div>
Michael Iseard's avatar
Michael Iseard committed
150
151
        </div>
    </div>
152
153
    <div class="container">
        <section>
Michael Iseard's avatar
Michael Iseard committed
154
            <div id="slider-demo-1" class="citrus-slider" data-citrus='{"height" : "400px", "effect" : "parallax", "slideTransition" : "zoom-fade"}'>
Michael Iseard's avatar
Michael Iseard committed
155
                <div>
156
                    <img src="img/1.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
157
158
159
160
                    <h2>Fast, light and free</h2>
                    <div style="text-align: center;">
                        <a class="btn btn-primary" href="#installation">Installation</a>
                    </div>
Michael Iseard's avatar
Michael Iseard committed
161
162
                </div>
                <div>
163
                    <img src="img/2.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
164
165
                </div>
                <div>
166
                    <img src="img/3.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
167
168
                </div>
                <div>
169
                    <img src="img/4.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
170
171
                </div>
            </div>
Michael Iseard's avatar
Michael Iseard committed
172
173
174
175
176
177
178
            <div id="demo-settings" class="row justify-content-center d-none d-lg-flex">
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="transitionButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Transition
                    </button>
                    <div class="dropdown-menu" aria-labelledby="transitionButton">
179
                        <a class="dropdown-item" data-settings='{"slideTransition": "downandout"}' href="#">Downandout</a>
Michael Iseard's avatar
Michael Iseard committed
180
                        <a class="dropdown-item" data-settings='{"slideTransition": "fallaway"}' href="#">Fallaway</a>
181
                        <a class="dropdown-item" data-settings='{"slideTransition": "pan"}' href="#">Pan</a>
Michael Iseard's avatar
Michael Iseard committed
182
                        <a class="dropdown-item" data-settings='{"slideTransition": "scope"}' href="#">Scope</a>
183
184
                        <a class="dropdown-item" data-settings='{"slideTransition": "slide"}' href="#">Slide</a>
                        <a class="dropdown-item" data-settings='{"slideTransition": "zoom-fade"}' href="#">Zoom-fade</a>
185
                    </div>
Michael Iseard's avatar
Michael Iseard committed
186
187
188
189
190
191
192
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="effectButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Effect Type
                    </button>
                    <div class="dropdown-menu" aria-labelledby="effectButton">
193
194
195
                        <a class="dropdown-item" data-settings='{"effect": "pan"}' href="#">Pan</a>
                        <a class="dropdown-item" data-settings='{"effect": "parallax"}' href="#">Parallax</a>
                        <a class="dropdown-item" data-settings='{"effect": "zoom"}' href="#">Zoom</a>
196
                        <a class="dropdown-item" data-settings='{"effect": false}' href="#">None</a>
197
                    </div>
Michael Iseard's avatar
Michael Iseard committed
198
199
200
201
202
203
204
205
206
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="animTextButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Animate Text
                    </button>
                    <div class="dropdown-menu" aria-labelledby="animTextButton">
                        <a class="dropdown-item" data-settings='{"animateText": true}' href="#">True</a>
                        <a class="dropdown-item" data-settings='{"animateText": false}' href="#">False</a>
207
                    </div>
Michael Iseard's avatar
Michael Iseard committed
208
209
210
211
212
213
214
215
216
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="indicatorsButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Indicators
                    </button>
                    <div class="dropdown-menu" aria-labelledby="indicatorsButton">
                        <a class="dropdown-item" data-settings='{"showIndicators": true}' href="#">True</a>
                        <a class="dropdown-item" data-settings='{"showIndicators": false}' href="#">False</a>
217
                    </div>
Michael Iseard's avatar
Michael Iseard committed
218
219
220
221
222
223
224
225
226
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="arrowsButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Arrows
                    </button>
                    <div class="dropdown-menu" aria-labelledby="arrowsButton">
                        <a class="dropdown-item" data-settings='{"showArrows": true}' href="#">True</a>
                        <a class="dropdown-item" data-settings='{"showArrows": false}' href="#">False</a>
227
                    </div>
Michael Iseard's avatar
Michael Iseard committed
228
229
230
231
232
233
234
235
236
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="autoPauseButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Auto Pause
                    </button>
                    <div class="dropdown-menu" aria-labelledby="autoPauseButton">
                        <a class="dropdown-item" data-settings='{"autoPause": true, "paused" : false}' href="#">True</a>
                        <a class="dropdown-item" data-settings='{"autoPause": false, "paused" : false}' href="#">False</a>
237
                    </div>
Michael Iseard's avatar
Michael Iseard committed
238
239
240
241
242
243
244
245
246
                </div>
                <div class="btn-group col-md-auto">
                    <button class="btn btn-outline-dark dropdown-toggle" type="button" id="durationButton" data-toggle="dropdown" aria-haspopup="true"
                        aria-expanded="false">
                        Slide Duration
                    </button>
                    <div class="dropdown-menu" aria-labelledby="durationButton">
                        <a class="dropdown-item" data-settings='{"slideDuration": 5000, "paused" : false}' href="#">5s</a>
                        <a class="dropdown-item" data-settings='{"slideDuration": 2000, "paused" : false}' href="#">2s</a>
247
248
                    </div>
                </div>
Michael Iseard's avatar
Michael Iseard committed
249
            </div>
250
251
252
253
        </section>
        <hr class="my-4">
        <br/>
        <section>
254
            <h2 id="installation" class="display-4">Installation</h2>
Michael Iseard's avatar
Michael Iseard committed
255
            <br/>
256
            <h3>Include required files</h3>
Michael Iseard's avatar
tidy up    
Michael Iseard committed
257
258
            <p>Include citrus-slider in your project by adding these two lines before the end of the
                <code>head</code> tag.</p>
259
260
            <pre>
                <code class="html">
261
&lt;link rel="stylesheet" href="css/citrus-slider.min.css"&gt;
262
&lt;script src="js/citrus-slider.min.js"&gt;&lt;/script&gt;
263
264
265
                </code>
            </pre>
            <h3>Add markup</h3>
266
267
268
269
            <p>A simple container
                <code>&lt;div&gt;</code>, with each child
                <code>&lt;div&gt;</code> as a separate slide. The first
                <code>&lt;img&gt;</code> tag will be used as the slide background image.</p>
Michael Iseard's avatar
Michael Iseard committed
270
271
            <pre>
                <code class="html">
272
273
274
275
276
&lt;div class="citrus-slider"&gt;
    &lt;div&gt;&lt;img src="img/slide-1.jpg"&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-2.jpg"&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-3.jpg"&gt;&lt;/div&gt;
&lt;/div&gt;
Michael Iseard's avatar
Michael Iseard committed
277
278
                </code>
            </pre>
279
280
            <h3>Add desired content</h3>
            <p>This can include even include other images. Remember that the first image will be used as the slide background.</p>
Michael Iseard's avatar
Michael Iseard committed
281
282
            <pre>
                <code class="html">
283
284
285
286
287
&lt;div class="citrus-slider"&gt;
    &lt;div&gt;&lt;img src="img/slide-1.jpg"&gt;&lt;h2&gt;Slide 1&lt;/h2&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-2.jpg"&gt;&lt;h2&gt;Slide 2&lt;/h2&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-3.jpg"&gt;&lt;h2&gt;Slide 3&lt;/h2&gt;&lt;/div&gt;
&lt;/div&gt;
Michael Iseard's avatar
Michael Iseard committed
288
289
290
                </code>
            </pre>
            <h3>Customize settings</h3>
291
292
293
            <p>Add
                <code>data-citrus</code> followed by a JSON string of the
                <a href="#settings">settings</a> you would like to change.</p>
Michael Iseard's avatar
Michael Iseard committed
294
295
            <pre>
                <code class="html">
296
297
298
299
300
&lt;div class="citrus-slider" data-citrus='{"duration" : 4000, "transition" : "pan"}'&gt;
    &lt;div&gt;&lt;img src="img/slide-1.jpg"&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-2.jpg"&gt;&lt;/div&gt;
    &lt;div&gt;&lt;img src="img/slide-3.jpg"&gt;&lt;/div&gt;
&lt;/div&gt;
Michael Iseard's avatar
Michael Iseard committed
301
302
                </code>
            </pre>
303
304
305
306
307
308
        </section>
        <hr class="my-4">
        <br/>
        <section>
            <h2 id="settings" class="display-4">Settings</h2>
            <br>
Michael Iseard's avatar
Michael Iseard committed
309
            <table class="table table-striped table-bordered">
310
311
312
313
314
315
316
317
318
                <thead>
                    <tr>
                        <th scope="col">Key</th>
                        <th scope="col">Value</th>
                        <th scope="col">Default</th>
                        <th scope="col">Description</th>
                    </tr>
                </thead>
                <tbody>
Michael Iseard's avatar
Michael Iseard committed
319
320
321
322
323
324
325
326
327
328
329
330
                    <tr>
                        <td>width</td>
                        <td>any valid css width (e.g 400px, 100%)</td>
                        <td>'100%'</td>
                        <td>Sets the width of the slider</td>
                    </tr>
                    <tr>
                        <td>height</td>
                        <td>any valid css height (e.g 400px, 100%)</td>
                        <td>'100%'</td>
                        <td>Sets the height of the slider</td>
                    </tr>
331
332
333
334
335
336
                    <tr>
                        <td>animationDuration</td>
                        <td>number in seconds</td>
                        <td>0.8</td>
                        <td>Determines how long the animation should take when transitioning slides</td>
                    </tr>
Michael Iseard's avatar
Michael Iseard committed
337
338
339
                    <tr>
                        <td>autoHeight</td>
                        <td>true, false</td>
340
                        <td>false</td>
Michael Iseard's avatar
Michael Iseard committed
341
342
                        <td>Automatically sets the height of the slider based on the height of the content</td>
                    </tr>
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
                    <tr>
                        <td>slideTransition</td>
                        <td>'pan', 'zoom-fade', 'scope', 'fallaway', 'downandout'</td>
                        <td>'pan'</td>
                        <td>Slide transition animation</td>
                    </tr>
                    <tr>
                        <td>slideIndex</td>
                        <td>1,2,3 etc.</td>
                        <td>1</td>
                        <td>Indicate which slide the slider should start on</td>
                    </tr>
                    <tr>
                        <td>slideDuration</td>
                        <td>number in ms (e.g 5000)</td>
                        <td>5000</td>
                        <td>Delay between slide transitions</td>
                    </tr>
                    <tr>
                        <td>effect</td>
363
364
                        <td>'zoom', 'pan', 'parallax', false</td>
                        <td>false</td>
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
                        <td>Slide resting animation type</td>
                    </tr>
                    <tr>
                        <td>animateText</td>
                        <td>true, false</td>
                        <td>true</td>
                        <td>Enable or disable slide content animating in after slide transition</td>
                    </tr>
                    <tr>
                        <td>showIndicators</td>
                        <td>true, false</td>
                        <td>true</td>
                        <td>Enable or disable slide indicators</td>
                    </tr>
                    <tr>
                        <td>showArrows</td>
                        <td>true, false</td>
                        <td>true</td>
                        <td>Enable or disable slide arrows</td>
                    </tr>
                    <tr>
                        <td>paused</td>
                        <td>true, false</td>
                        <td>false</td>
                        <td>Enable or disable automatic, timed slide transition</td>
                    </tr>
                    <tr>
                        <td>autoPause</td>
                        <td>true, false</td>
                        <td>true</td>
                        <td>Enable or disable automatic pausing (e.g. when user interacts with slider)</td>
                    </tr>
                </tbody>
            </table>
        </section>
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
        <section>
            <h2 id="methods" class="display-4">Methods</h2>
            <br>
            <p>Invoking
                <code>citrus</code> will return a slider object with various methods. This will allow you to programmatically control
                the slider. For example, to reset the slider you would use
                <code>citrus[0].reset()</code>. The
                <code>[0]</code> represents the index of the slider. If you have more than one slider on a page you will need to
                change this to the slider you intend to target.</p>
            <table class="table table-striped table-bordered">
                <thead>
                    <tr>
                        <th scope="col">Method</th>
                        <th scope="col">Description</th>
                        <th scope="col">Example</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>play()</td>
                        <td>Unpauses and starts the automatic slideshow</td>
                        <td>citrus[0].play()</td>
                    </tr>
                    <tr>
                        <td>stop()</td>
                        <td>Stops and pauses the automatic slideshow</td>
                        <td>citrus[0].stop()</td>
                    </tr>
                    <tr>
                        <td>prevSlide()</td>
                        <td>Goes to the previous slide in the sequence</td>
                        <td>citrus[0].prevSlide()</td>
                    </tr>
                    <tr>
                        <td>nextSlide()</td>
                        <td>Goes to the next slide in the sequence</td>
                        <td>citrus[0].nextSlide()</td>
                    </tr>
                    <tr>
                        <td>gotoSlide()</td>
                        <td>Goes to the specified slide in the sequence</td>
                        <td>citrus[0].gotoSlide(2)</td>
                    </tr>
                    <tr>
                        <td>reset()</td>
                        <td>Resets slider by rebuilding and resetting status</td>
                        <td>citrus[0].reset()</td>
                    </tr>
                </tbody>
            </table>
        </section>
451
    </div>
Michael Iseard's avatar
Michael Iseard committed
452

453
    <footer id="site-footer" class="footer">
Michael Iseard's avatar
Michael Iseard committed
454
        <div class="container">
455
            <span>&copy; Copyright 2018 Iseard Media - All rights reserved</span>
Michael Iseard's avatar
Michael Iseard committed
456
457
458
        </div>
    </footer>
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
Michael Iseard's avatar
Michael Iseard committed
459
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js" integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=" crossorigin="anonymous"></script>
Michael Iseard's avatar
Michael Iseard committed
460
461
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
Michael Iseard's avatar
Michael Iseard committed
462

Michael Iseard's avatar
Michael Iseard committed
463
    <!-- citrus-Slider JS -->
Michael Iseard's avatar
Michael Iseard committed
464
    <script src="js/citrus-slider.min.js?v=1.0.1"></script>
Michael Iseard's avatar
Michael Iseard committed
465

466
    <script>
Michael Iseard's avatar
Michael Iseard committed
467
        var settings = document.getElementById("demo-settings").querySelectorAll(".dropdown-item")
468
        var slider = citrus[0].settings
Michael Iseard's avatar
Michael Iseard committed
469
470
471
472
473
474
475
        for (let i = 0; i < settings.length; i++) {
            settings[i].addEventListener('click', function (e) {
                e.preventDefault()
                var update = JSON.parse(e.target.dataset.settings)
                for (const key of Object.keys(update)) {
                    slider[key] = update[key]
                }
476
                citrus[0].reset()
Michael Iseard's avatar
Michael Iseard committed
477
478
479
            })
        }
    </script>
480

Michael Iseard's avatar
Michael Iseard committed
481
482
483
484
485
    <!-- highlight.js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
    <script>
        hljs.initHighlightingOnLoad();
    </script>
Michael Iseard's avatar
Michael Iseard committed
486
</body>
Michael Iseard's avatar
Michael Iseard committed
487

Michael Iseard's avatar
Michael Iseard committed
488
</html>