Response title
This is preview!




Hi guys and gals,
could someone please tell me how to include an ID on a button when adding it to a modal dialog form?
The closest I've got is to by using a css selector:
but this seems to get broken when closing and reopening the dialog.
Any help will be very appreciated.
I have the following code.
You can also create buttons in this way and set its ids:
$('#dialog').dialog({
// properties ...
buttons: [{
id:"btn-accept",
text: "Accept",
click: function() {
$(this).dialog("close");
}
},{
id:"btn-cancel",
text: "Cancel",
click: function() {
$(this).dialog("close");
}
}]
});
© 2012 jQuery Foundation
Sponsored by
and others.
