]> source.dussan.org Git - jquery-ui.git/commitdiff
slider: use internal methods _valueMin() and _valueMax()
authorRichard Worth <rdworth@gmail.com>
Mon, 12 Oct 2009 11:06:57 +0000 (11:06 +0000)
committerRichard Worth <rdworth@gmail.com>
Mon, 12 Oct 2009 11:06:57 +0000 (11:06 +0000)
ui/jquery.ui.slider.js

index f8140354094bfb87f54f46af235c36b2ae73d6f9..d27d9afab077966311e3387c7410853ad71f51be 100644 (file)
@@ -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);