Is it possible to add icons to the buttons on a jQuery UI Dialog? I\'ve tried doing it this way:
$(\"#DeleteDialog\").dialog({
resizable: false,
hei
I ran in the same issue. It seems jquery stores the text in an attribute called "text" in the button itself, and not as text inside the button.
I solved it like this:
$dialog.dialog({
resizable:false,
draggable:false,
modal:true,
open:function (event, ui) {
$(this).parents('.ui-dialog').find('.cancel.ui-button').text('Cancel');
//or you could use: $(this).parents('.ui-dialog').find('button[text="Cancel"]').text('Cancel');
$(this).parents('.ui-dialog').find('.add.ui-button').text('OK');
},
buttons:[
{
text:"OK",
click:function () {
},
"class":"add"
},
{
text:"Cancel",
click:function () {
},
"class":"cancel"
}
]
});