aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-10-12 09:27:23 +0000
committerRichard Worth <rdworth@gmail.com>2009-10-12 09:27:23 +0000
commit299f20b29966ba5c4cd3570ccb9ca871f39242bb (patch)
tree0030cdeee8d716539121a18156379c749e030c22 /ui/jquery.ui.slider.js
parent80725988255b4a743e09857c7848415b959327fa (diff)
downloadjquery-ui-299f20b29966ba5c4cd3570ccb9ca871f39242bb.tar.gz
jquery-ui-299f20b29966ba5c4cd3570ccb9ca871f39242bb.zip
slider: fixed two failing unit tests
'value method set respects min' 'value method set respects max'
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index ca2dad2eb..84dc9633c 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -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);
}