-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
99 lines (93 loc) · 2.41 KB
/
demo.html
File metadata and controls
99 lines (93 loc) · 2.41 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="pt-BR" ng-app="planedia">
<head>
<meta charset="UTF-8">
<title>Teste Slider</title>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://rawgit.com/Planedia/pl-slider/master/slider.js"></script>
<script>
'use strict';
var PlanediaApp = angular.module('planedia', ['pl.slider']);
PlanediaApp.controller('slider', function( $scope ) {
$scope.minRate = [];
$scope.maxRate = [];
$scope.set = {
minRate: 0,
maxRate: 1000
}
$scope.value = {
rate: [300, 710]
};
$scope.$watch('value.rate', function( term ){
$scope.minRate = term[0]
$scope.maxRate = term[1]
});
});
</script>
<style>
.ui-slider .ui-slider-handle {
position: absolute;
z-index: 2;
width: 1.2em;
height: 1.2em;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}
.ui-slider-horizontal .ui-slider-handle {
top: -.3em;
margin-left: -.6em;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
border: 1px solid #FFF;
background: #289daf;
width: 10px;
height: 20px;
font-weight: bold;
border-radius: 5px;
color: #1c94c4;
}
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
font-size: .7em;
display: block;
border: 0;
background-position: 0 0;
background-color: #289daf;
}
.ui-slider-horizontal .ui-slider-range {
top: 0;
height: 100%;
}
.ui-widget-content {
background: #2c3e50;
}
.ui-slider-horizontal {
height: 10px;
border-radius: 10px;
}
.ui-slider {
position: relative;
text-align: left;
margin-top: 15px;
}
}
</style>
</head>
<body ng-controller="slider">
<div
pl-Slider="{range: true}"
min="{{ set.minRate }}"
max="{{ set.maxRate }}"
step="5"
use-decimals
ng-model="value.rate">
</div>
<p class="price-range">
{{ minRate | currency: "$ " }} - {{ maxRate | currency: "$ " }}
</p>
</body>
</html>