aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/jquery.ui.slider.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index f81403540..d27d9afab 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -410,8 +410,8 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
value: function(newValue) {
if (arguments.length) {
- newValue = newValue >= this.options.min ? newValue : this.options.min;
- newValue = newValue <= this.options.max ? newValue : this.options.max;
+ if (newValue < this._valueMin()) newValue = this._valueMin();
+ if (newValue > this._valueMax()) newValue = this._valueMax();
this.options.value = newValue;
this._refreshValue();
this._change(null, 0);