]> source.dussan.org Git - jquery-ui.git/commitdiff
slider: added ui.values in the slide callback for a range
authorRichard Worth <rdworth@gmail.com>
Wed, 31 Dec 2008 04:48:12 +0000 (04:48 +0000)
committerRichard Worth <rdworth@gmail.com>
Wed, 31 Dec 2008 04:48:12 +0000 (04:48 +0000)
ui/ui.slider.js

index 6c775a1040d6f4ae144bd4a61e380ef6f149a686..213607bac28f855c38200fc8f3ec4132b4a2db8f 100644 (file)
@@ -262,10 +262,13 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
                        var handle = this.handles.filter(".ui-state-active");
                        var index = handle.data("index.ui-slider-handle");
                        if (newVal != this.values(index)) {
+                               var newValues = this.values();
+                               newValues[index] = newVal;
                                // A slide can be canceled by returning false from the slide callback
                                var allowed = this._trigger("slide", event, {
                                        handle: handle,
-                                       value: newVal
+                                       value: newVal,
+                                       values: newValues
                                });
                                if (allowed !== false)
                                        this.values(index, newVal);