index.html 21.9 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 -->
26
    <link rel="stylesheet" type="text/css" href="css/citrus-slider.min.css?v=1.0.6">
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
39


    <title>Citrus Slider - A modern JavaScript carousel.</title>
40
41
    <meta property="og:image" content="https://citrus.iseardmedia.com/img/og.png" />
    <meta property="og:description" content="A modern JavaScript carousel 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
82
83
        #slider-demo-1 {
            margin-top: -232px;
            border: 10px solid #fff;
        }

84
        #site-footer {
Michael Iseard's avatar
Michael Iseard committed
85
            background-color: #51bfd6;
86
87
88
            color: #fff;
            text-align: center;
            padding: 2em;
Michael Iseard's avatar
Michael Iseard committed
89
        }
Michael Iseard's avatar
Michael Iseard committed
90
    </style>
Michael Iseard's avatar
Michael Iseard committed
91
</head>
Michael Iseard's avatar
Michael Iseard committed
92

Michael Iseard's avatar
Michael Iseard committed
93
<body>
Michael Iseard's avatar
Michael Iseard committed
94

95
    <nav id="main-nav" class="navbar navbar-expand-lg navbar-light">
Michael Iseard's avatar
Michael Iseard committed
96
        <div class="container">
Michael Iseard's avatar
Michael Iseard committed
97
            <img src="img/logo.svg?v1.1" width="30" height="30" class="d-inline-block align-top" alt="">
98
99
100
101
102
            <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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
                <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">
                        <a class="nav-item nav-link" href="https://gitea.iseardmedia.com/michael">Gitea</a>
                    </li>
                </ul>
            </div>
123
        </div>
Michael Iseard's avatar
Michael Iseard committed
124
    </nav>
Michael Iseard's avatar
Michael Iseard committed
125
    <div id="intro" class="jumbotron jumbotron-fluid">
Michael Iseard's avatar
Michael Iseard committed
126
        <div class="container">
Michael Iseard's avatar
Michael Iseard committed
127
128
            <div class="row align-items-center justify-content-center">
                <div class="col-8">
Michael Iseard's avatar
Michael Iseard committed
129
                    <h1 class="display-3" style="font-weight: 900;">
Michael Iseard's avatar
Michael Iseard committed
130
131
132
133
                        Citrus Slider</h1>
                    <p class="lead">A modern JavaScript carousel with no third party requirements.</p>
                    <hr class="my-4">
                    <p class="lead">
134
                        <a class="btn btn-primary btn-lg" href="https://gitea.iseardmedia.com/michael/Citrus-Slider/archive/1.0.6.zip" role="button">Download</a>
Michael Iseard's avatar
Michael Iseard committed
135
136
                        <a class="btn btn-primary btn-lg" href="https://gitea.iseardmedia.com/michael/citrus-Slider" role="button">Source</a>
                    </p>
137
138
139
                    <span>v1.0.6
                        <span class="badge badge-danger">beta</span>
                    </span>
Michael Iseard's avatar
Michael Iseard committed
140
141
                </div>
                <div class="col d-none d-lg-block">
142
                    <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
143
144
                </div>
            </div>
Michael Iseard's avatar
Michael Iseard committed
145
146
        </div>
    </div>
147
148
    <div class="container">
        <section>
Michael Iseard's avatar
Michael Iseard committed
149
            <div id="slider-demo-1" class="citrus-slider" data-citrus='{"height" : "400px", "slideTransition" : "zoom-fade"}'>
Michael Iseard's avatar
Michael Iseard committed
150
                <div>
151
                    <img src="img/1.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
152
153
154
155
                    <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
156
157
                </div>
                <div>
158
                    <img src="img/2.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
159
160
                </div>
                <div>
161
                    <img src="img/3.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
162
163
                </div>
                <div>
164
                    <img src="img/4.png?v=2.0.0">
Michael Iseard's avatar
Michael Iseard committed
165
166
                </div>
            </div>
Michael Iseard's avatar
Michael Iseard committed
167
168
169
170
171
172
173
            <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">
174
                        <a class="dropdown-item" data-settings='{"slideTransition": "downandout"}' href="#">Downandout</a>
Michael Iseard's avatar
Michael Iseard committed
175
                        <a class="dropdown-item" data-settings='{"slideTransition": "fallaway"}' href="#">Fallaway</a>
176
                        <a class="dropdown-item" data-settings='{"slideTransition": "pan"}' href="#">Pan</a>
Michael Iseard's avatar
Michael Iseard committed
177
                        <a class="dropdown-item" data-settings='{"slideTransition": "scope"}' href="#">Scope</a>
178
179
                        <a class="dropdown-item" data-settings='{"slideTransition": "slide"}' href="#">Slide</a>
                        <a class="dropdown-item" data-settings='{"slideTransition": "zoom-fade"}' href="#">Zoom-fade</a>
180
                    </div>
Michael Iseard's avatar
Michael Iseard committed
181
182
183
184
185
186
187
188
189
                </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">
                        <a class="dropdown-item" data-settings='{"effectType": "pan"}' href="#">Pan</a>
                        <a class="dropdown-item" data-settings='{"effectType": "zoom"}' href="#">Zoom</a>
190
                    </div>
Michael Iseard's avatar
Michael Iseard committed
191
192
193
194
195
196
197
198
199
                </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>
200
                    </div>
Michael Iseard's avatar
Michael Iseard committed
201
202
203
204
205
206
207
208
209
                </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>
210
                    </div>
Michael Iseard's avatar
Michael Iseard committed
211
212
213
214
215
216
217
218
219
                </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>
220
                    </div>
Michael Iseard's avatar
Michael Iseard committed
221
222
223
224
225
226
227
228
229
                </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>
230
                    </div>
Michael Iseard's avatar
Michael Iseard committed
231
232
233
234
235
236
237
238
239
                </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>
240
241
                    </div>
                </div>
Michael Iseard's avatar
Michael Iseard committed
242
            </div>
243
244
245
246
        </section>
        <hr class="my-4">
        <br/>
        <section>
247
            <h2 id="installation" class="display-4">Installation</h2>
Michael Iseard's avatar
Michael Iseard committed
248
            <br/>
249
            <h3>Include required files</h3>
Michael Iseard's avatar
tidy up    
Michael Iseard committed
250
251
            <p>Include citrus-slider in your project by adding these two lines before the end of the
                <code>head</code> tag.</p>
252
253
            <pre>
                <code class="html">
254
&lt;link rel="stylesheet" href="css/citrus-slider.min.css"&gt;
255
&lt;script src="js/citrus-slider.min.js"&gt;&lt;/script&gt;
256
257
258
                </code>
            </pre>
            <h3>Add markup</h3>
259
260
261
262
            <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
263
264
            <pre>
                <code class="html">
265
266
267
268
269
&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
270
271
                </code>
            </pre>
272
273
            <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
274
275
            <pre>
                <code class="html">
276
277
278
279
280
&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
281
282
283
                </code>
            </pre>
            <h3>Customize settings</h3>
284
285
286
            <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
287
288
            <pre>
                <code class="html">
289
290
291
292
293
&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
294
295
                </code>
            </pre>
296
297
298
299
300
301
        </section>
        <hr class="my-4">
        <br/>
        <section>
            <h2 id="settings" class="display-4">Settings</h2>
            <br>
Michael Iseard's avatar
Michael Iseard committed
302
            <table class="table table-striped table-bordered">
303
304
305
306
307
308
309
310
311
                <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
312
313
314
315
316
317
318
319
320
321
322
323
                    <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>
324
325
326
327
328
329
                    <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
330
331
332
333
334
335
                    <tr>
                        <td>autoHeight</td>
                        <td>true, false</td>
                        <td>'100%'</td>
                        <td>Automatically sets the height of the slider based on the height of the content</td>
                    </tr>
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
                    <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>
                        <td>true, false</td>
                        <td>true</td>
                        <td>Enable or disable slide resting animation</td>
                    </tr>
                    <tr>
                        <td>effectType</td>
                        <td>'zoom', 'pan'</td>
                        <td>'zoom'</td>
                        <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>
399
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
        <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>
450
    </div>
Michael Iseard's avatar
Michael Iseard committed
451

452
    <footer id="site-footer" class="footer">
Michael Iseard's avatar
Michael Iseard committed
453
        <div class="container">
454
            <span>&copy; Copyright 2018 Iseard Media - All rights reserved</span>
Michael Iseard's avatar
Michael Iseard committed
455
456
457
        </div>
    </footer>
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
Michael Iseard's avatar
Michael Iseard committed
458
    <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
459
460
    <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
461

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

465
    <script>
Michael Iseard's avatar
Michael Iseard committed
466
        var settings = document.getElementById("demo-settings").querySelectorAll(".dropdown-item")
467
        var slider = citrus[0].settings
Michael Iseard's avatar
Michael Iseard committed
468
469
470
471
472
473
474
        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]
                }
475
                citrus[0].reset()
Michael Iseard's avatar
Michael Iseard committed
476
477
478
            })
        }
    </script>
479

Michael Iseard's avatar
Michael Iseard committed
480
481
482
483
484
    <!-- 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
485
</body>
Michael Iseard's avatar
Michael Iseard committed
486

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