-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample.html
37 lines (34 loc) · 1.25 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TsIonRangeSlider Test</title>
<!--Plugin CSS file with desired skin-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css"/>
<script src="https://unpkg.com/[email protected]/dist/ts-ion-range-slider.min.js"></script>
</head>
<body>
</body>
<script>
document.addEventListener("DOMContentLoaded", function() {
const input = document.createElement('input');
document.body.append(input);
const sliderInputElement = new TsIonRangeSlider.Slider(input, {
skin : 'round',
grid : true,
grid_margin : true,
grid_num : 4,
grid_snap : false,
hide_from_to : false,
hide_min_max : false,
onChange : obj => console.log(obj),
onFinish : obj => console.log(obj),
onStart : obj => console.log(obj),
onUpdate : obj => console.log(obj),
type : 'double',
values : ['a', 'b', 'c'],
values_separator: ','
});
});
</script>
</html>