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
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="css/jquery-ui.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="css/multi-handle-slider.css">
</head>
<body style="overflow: auto;">
<div id="slider" ms-controller="multiHandleSliderController">
<div class="sliderWrapper">
<div class="centerRail">
<div id="slider-multi-handles"></div>
</div>
</div>
<div class="row" data-name="tab_zone">
<div class="col-md-12 sliderValues">
<ul>
<li ms-repeat-el="items">{{el.name}}:{{el.value}}%</li>
</ul>
</div>
</div>
</div>
<div id="slider1" ms-controller="multiHandleSliderController1" style="position:absolute;top:300px;left:5%">
<div class="sliderWrapper">
<div class="centerRail">
<div id="slider-multi-handles-1"></div>
</div>
</div>
<div class="row">
<div class="col-md-12 sliderValues" style="width: 200px;top: 120px;">
<ul>
<li ms-repeat-e="items">{{e.name}}:{{e.value}}%</li>
</ul>
</div>
</div>
</div>
<script src="js/jquery-1.10.2.min.js"></script>
<script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<!-- <script src="bootstrap/js/bootstrap.min.js"></script> -->
<script src="js/avalon.modern.js"></script>
<script src="js/multi-handle-slider.js"></script>
<script>
var items = [
{name: "警告", value: 20},
{name: "次要", value: 40},
{name: "主要", value: 60},
{name: "严重", value: 80}
];
var items1 = [
{name: "警告1", value: 20},
{name: "次要1", value: 40},
{name: "主要1", value: 60},
{name: "严重1", value: 80}
];
var vm = vmMultiHandleSlider("multiHandleSliderController");
vm.$setItems(items);
vm.$initSlider("slider-multi-handles", "slider");
//vmMultiHandleSlider.$setItems(items1);
//vmMultiHandleSlider.$initSlider("slider-multi-handles-1");
var vm1 = vmMultiHandleSlider("multiHandleSliderController1");
vm1.$setItems(items1);
vm1.$initSlider("slider-multi-handles-1", "slider1");
</script>
</body>
</html>
|