// value (even if same as previous value), via mouse(mouseup) or keyboard(keyup)
// or value method/option"
test( "change", function() {
- expect(7);
+ expect(8);
var handle;
// Test mouseup at end of handle slide (mouse)
el.find( ".ui-slider-handle" ).eq( 0 )
.simulate( "keydown", { keyCode: $.ui.keyCode.LEFT } )
.simulate( "keypress", { keyCode: $.ui.keyCode.LEFT } )
- .simulate( "keyup", { charCode: $.ui.keyCode.LEFT } );
+ .simulate( "keyup", { keyCode: $.ui.keyCode.LEFT } );
reset();
// Test value method
var index = $(this).data("index.ui-slider-handle");
if (self._keySliding) {
+ self._keySliding = false;
self._stop(event, index);
self._change(event, index);
- self._keySliding = false;
$(this).removeClass("ui-state-active");
}
},
_setOption: function(key, value) {
+
+ var i,
+ valsLength = 0;
+ if ( jQuery.isArray(this.options.values) ) {
+ valsLength = this.options.values.length;
+ };
$.Widget.prototype._setOption.apply(this, arguments);
case 'value':
this._animateOff = true;
this._refreshValue();
+ this._change(null, 0);
this._animateOff = false;
break;
case 'values':
this._animateOff = true;
this._refreshValue();
+ for (i = 0; i < valsLength; i++) {
+ this._change(null, i);
+ }
this._animateOff = false;
break;
}