How do I remove/hide the \"Ok\" button dynamically using jquery?
$(\'#dialog-save\').dialog({
autoOpen: false,
modal: false,
One commonly overlooked feature of the UI dialog is that you can set various other properties of the buttons, including 'class' and 'id'. These can be very useful if you need to manipulate the buttons after instantiation.
For example...
$('#dialog-save').dialog({
autoOpen: false,
modal: false,
draggable: true,
width: 275,
height: 175,
{
id: 'okBtn',
text: "Ok",
click: function () {
$(this).dialog("close");
}
}]
});
// And then at some other point in the code...
$('#okBtn').remove();