I am trying to make a popup dialog form with jQuery UI, but the buttons that are generated do not have any text in them.
$(function(){
$( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
resizable: false,
buttons: {
"OK": function() {
alert("test");
$( this ).dialog( "close" );
}
}
});
The code of the generated button is this:
<div class="ui-dialog-buttonset">
<button type="button" text="OK" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
<span class="ui-button-text"/>
</button>
</div>
Also, the code of the button handler is executed when the page loads, which means I see the “test” popup when i load the page
I’m using jQuery and jQuery UI loaded by the Google API
Silly me! I was using an older version of jQuery (1.3.2) which should be fully compatible with jQuery UI, but I guess not. Thanks!