I know this question has been answered already, but if anyone is interesed you can override the _buttonHtml class (which renders the buttons) using the widget factory now. It's fairly simple to do.
You can do this by using the following syntax:
//Overriding the default buttons with our own classes
$.widget("ui.spinner", $.ui.spinner, {
_buttonHtml: function () {
return "" +
"<button type='button' class='ui-spinner-up' tabindex='-1'></button>";
}
});
//To call it, we simply instantiate like normal:
$("#myElement").spinner();
As always, you could instantiate with any options you would normally pass just fine
$("#myElement").spinner({min: '1', max: '10', numberFormat: 'n0'});
To call a custom namespace, you would use this:
$.widget("custom.myExtension", $.ui.spinner, {
red: function() {
this.element.css( "color", "red" );
}
});
//Instantiate it like so:
$("myElement").myExtension("red");
Easy breezy. In this example, I am overriding the default behavior for the jQuery UI spinner. The first argument is your custom name. The documentation suggests you name it in the custom namespace. So something like "custom.myButton" (whatever you like) would be acceptable here. The second argument is the base widget you are trying to overwrite. In our case, it is the ui.spinner. Then you provide the overridden method; if you look at the source code for the spinner, you can see that this method currently exists within the source, and we are simply overriding the default behavior.
As you can see in the second example, I extended the ui.spinner with my own namespace. Hope this helps anyone in the same boat.
Sources:
http://learn.jquery.com/jquery-ui/widget-factory/extending-widgets/
http://api.jqueryui.com/spinner/#method-_buttonHtml