From: Richard Worth Date: Mon, 12 Oct 2009 11:06:57 +0000 (+0000) Subject: slider: use internal methods _valueMin() and _valueMax() X-Git-Tag: 1.8a2~56 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3af7fa81f4a179acb4e1e5c597f1f8d7d08c0b63;p=jquery-ui.git slider: use internal methods _valueMin() and _valueMax() --- 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);