I am creating a jQuery UI dialog programmatically, as in
$( "#dialog" ).dialog({
autoOpen: false,
width: 400,
buttons: [
{
class: "myButton",
text: "Ok",
click: function() {
$( this ).dialog( "close" );
}
},
{
text: "Cancel",
click: function() {
$( this ).dialog( "close" );
}
}
]
});
When the dialog is created, however, the button has a list of default classes assigned to it, and the label s wrapped in a SPAN.
<button type="button" class="myButton ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
<span class="ui-button-text">Ok</span>
</button>
I'd rather the button just have myClass, period, and if possible no span. As in:
<button type="button" class="myButton">Ok</button>
How can I accomplish this?