Skip to content

Commit b889f66

Browse files
committed
Slider: Add support for setOption with classes
1 parent 8aca5ee commit b889f66

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

ui/slider.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
return $.widget( "ui.slider", $.ui.mouse, {
2929
version: "@VERSION",
3030
widgetEventPrefix: "slide",
31-
3231
options: {
3332
animate: false,
3433
classes: {
@@ -428,6 +427,25 @@ return $.widget( "ui.slider", $.ui.mouse, {
428427
}
429428
},
430429

430+
_elementsFromClassKey: function( classKey ) {
431+
switch( classKey ) {
432+
case "ui-slider":
433+
return this.element;
434+
case "ui-slider-handle":
435+
return this.handles;
436+
case "ui-slider-range":
437+
if ( this.options.range ) {
438+
return this.range;
439+
}
440+
case "ui-slider-range-min":
441+
return this.range;
442+
case "ui-slider-" + this.options.orientation:
443+
return this.element;
444+
default:
445+
return this._superApply( arguments );
446+
}
447+
},
448+
431449
_setOption: function( key, value ) {
432450
var i,
433451
valsLength = 0;

0 commit comments

Comments
 (0)