StackOverflow Solution
Solution to the question asked here :
http://stackoverflow.com/q/9300736/314763
by FrictionlessPulley
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/humanity/jquery-ui.css">
<input type="button" value="remove Buttons" class="change"/>
<div id="dialog-save"> Dialog</div>
JavaScript
$(function(){
$('#dialog-save').dialog({
autoOpen: false,
modal: true,
draggable: true,
width: 275,
height: 175,
buttons: {
"Ok": function () {
$(this).dialog("close");
}
}
});
$('#dialog-save').dialog('open');
$('.change').click(function(){
$('#dialog-save').dialog("option",{buttons:{}});
$('#dialog-save').dialog('open');
});
});