]> source.dussan.org Git - jquery-ui.git/commitdiff
updated the condition to assert that values.legnth ==2 and range: true. (fixed ...
authorAndrew Powell <powella@gmail.com>
Sun, 19 Apr 2009 23:50:48 +0000 (23:50 +0000)
committerAndrew Powell <powella@gmail.com>
Sun, 19 Apr 2009 23:50:48 +0000 (23:50 +0000)
ui/ui.slider.js

index 2f5ac1e7b009f09bd0de0612c2217f11dda69f1d..e011043eaa7fad5991aa1dd35c2b35e3650ab13e 100644 (file)
@@ -336,8 +336,10 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
 
                        var otherVal = this.values(index ? 0 : 1);
 
-                       if ((index == 0 && newVal >= otherVal) || (index == 1 && newVal <= otherVal))
-                               newVal = otherVal;
+                       if ((this.options.values.length == 2 && this.options.range === true) && 
+                               ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){
+                               newVal = otherVal;
+                       }
 
                        if (newVal != this.values(index)) {
                                var newValues = this.values();