$("#termSheetPrinted").dialog({
autoOpen: false,
resizable: true,
height: 800,
width: 950,
position: 'center',
title: 'Term Sheet',
modal: true,
buttons: {
"Print": function() {
$("#termSheetPrinted").jqprint();
},
"Cancel": function() {
$("#termSheetPrinted").html('');
$(this).dialog("close");
}
}
});
このダイアログは、ウィンドウの上部に「x」が表示されて閉じます。この「x」が「キャンセル」ボタンと同じようにクリックされたときに、$(this).dialog("close");
を実行します。JQueryダイアログが「x」でキャンセルするのと同じ方法でキャンセルします。
どうすればいいですか?