Skip to content

Commit 080c34b

Browse files
committed
Spinner: Updates for new button widget and classes option
1 parent ef4e7ad commit 080c34b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

ui/spinner.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,19 @@ return $.widget( "ui.spinner", {
230230
// button bindings
231231
this.buttons = uiSpinner.children( "a" )
232232
.attr( "tabIndex", -1 )
233-
.button();
233+
.button( {
234+
classes: {
235+
"ui-button": ""
236+
}
237+
} );
234238

235239
// TODO: Right now button does not support classes this is already updated in button PR
236240
this._removeClass( this.buttons, "ui-corner-all" );
237241

238242
this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
239243
this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
240-
this._addClass( this.buttons.first().find( ".ui-button-text span" ), null,
241-
"ui-icon " + this.options.icons.up );
242-
this._addClass( this.buttons.last().find( ".ui-button-text span" ), null,
243-
"ui-icon " + this.options.icons.down );
244+
this.buttons.first().button( "option", "icon", this.options.icons.up );
245+
this.buttons.last().button( "option", "icon", this.options.icons.down );
244246

245247
// IE 6 doesn't understand height: 50% for the buttons
246248
// unless the wrapper has an explicit height
@@ -284,10 +286,10 @@ return $.widget( "ui.spinner", {
284286
_buttonHtml: function() {
285287
return "" +
286288
"<a>" +
287-
"<span>&#9650;</span>" +
289+
"<span>&#9650;</span>" +
288290
"</a>" +
289291
"<a>" +
290-
"<span>&#9660;</span>" +
292+
"<span>&#9660;</span>" +
291293
"</a>";
292294
},
293295

0 commit comments

Comments
 (0)