Skip to content

Commit 81300fe

Browse files
committed
Spinner: Updates for new button widget and classes option
1 parent 9392e34 commit 81300fe

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ui/spinner.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,19 @@ return $.widget( "ui.spinner", {
227227
// button bindings
228228
this.buttons = uiSpinner.find( "a" )
229229
.attr( "tabIndex", -1 )
230-
.button();
230+
.button({
231+
classes: {
232+
"ui-button": ""
233+
}
234+
});
231235

232236
// Right now button does not support classes this is already updated in button PR
233237
this._removeClass( this.buttons, "ui-corner-all" );
234238

235239
this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
236240
this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
237-
this._addClass( this.buttons.first().find( ".ui-button-text span" ), null,
238-
"ui-icon " + this.options.icons.up );
239-
this._addClass( this.buttons.last().find( ".ui-button-text span" ), null,
240-
"ui-icon " + this.options.icons.down );
241+
this.buttons.first().button( "option", "icon", this.options.icons.up );
242+
this.buttons.last().button( "option", "icon", this.options.icons.down );
241243

242244
// IE 6 doesn't understand height: 50% for the buttons
243245
// unless the wrapper has an explicit height

0 commit comments

Comments
 (0)