File: update.js

package info (click to toggle)
node-nouislider 15.6.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,880 kB
  • sloc: javascript: 5,123; php: 464; sh: 32; python: 28; makefile: 11
file content (53 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (3)
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
var button1 = document.getElementById('update-1');
var button2 = document.getElementById('update-2');
var button3 = document.getElementById('update-3');
var button4 = document.getElementById('update-4');
var button5 = document.getElementById('update-5');
var button6 = document.getElementById('update-6');

button1.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        range: {
            'min': 20,
            'max': 50
        }
    });
});

button2.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        range: {
            'min': 10,
            'max': 40
        }
    });
});

button3.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        tooltips: true,
        pips: null
    });
});

button4.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        tooltips: false,
        pips: {
            mode: 'range',
            density: 3
        }
    });
});

button5.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        padding: 10,
    });
});

button6.addEventListener('click', function () {
    updateSlider.noUiSlider.updateOptions({
        padding: null,
    });
});