aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-03-27 11:06:31 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2010-03-27 11:06:31 +0100
commita009595bd3d7c6992d438900672fdf98f5e728c3 (patch)
tree6e9a6f074b639db9a92cd08f0be5f971356be453 /ui/jquery.ui.slider.js
parentf1933142e485ceaaef9ef52e56abb9f43eaaad2d (diff)
parentc49be0be1a57cac325f021ffddc2f0fbccde1553 (diff)
downloadjquery-ui-a009595bd3d7c6992d438900672fdf98f5e728c3.tar.gz
jquery-ui-a009595bd3d7c6992d438900672fdf98f5e728c3.zip
Merge branch 'master' into tooltip
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index c392facd7..185fe809c 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -152,7 +152,7 @@ $.widget("ui.slider", $.ui.mouse, {
break;
}
- var curVal, newVal, step = self._step();
+ var curVal, newVal, step = self.options.step;
if (self.options.values && self.options.values.length) {
curVal = newVal = self.values(index);
} else {
@@ -526,11 +526,6 @@ $.widget("ui.slider", $.ui.mouse, {
},
- _step: function() {
- var step = this.options.step;
- return step;
- },
-
_value: function() {
//internal value getter
// _value() returns value trimmed by min and max
@@ -564,20 +559,21 @@ $.widget("ui.slider", $.ui.mouse, {
},
_trimValue: function(val) {
- if (val < this._valueMin()) val = this._valueMin();
- if (val > this._valueMax()) val = this._valueMax();
-
+ if (val < this._valueMin()) {
+ return this._valueMin();
+ }
+ if (val > this._valueMax()) {
+ return this._valueMax();
+ }
return val;
},
_valueMin: function() {
- var valueMin = this.options.min;
- return valueMin;
+ return this.options.min;
},
_valueMax: function() {
- var valueMax = this.options.max;
- return valueMax;
+ return this.options.max;
},
_refreshValue: function() {