mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
slider: fixed two failing unit tests
'value method set respects min' 'value method set respects max'
This commit is contained in:
parent
8072598825
commit
299f20b299
2
ui/jquery.ui.slider.js
vendored
2
ui/jquery.ui.slider.js
vendored
@ -405,6 +405,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;
|
||||
this._setData("value", newValue);
|
||||
this._change(null, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user