Here is Code , when .dialog('close') triggers only the content of dialog is closed and the title bar remains on the page , Does any one have idea am I using the wrong way to close dialog box ?
function popDialog(){
if ($('#dialog').parents('.ui-dialog:visible').length) {
$
('#dialog').dialog('close');
}
$
("#dialog").dialog({
open
: function(){
$
(this).load('/privacy.jsp');
},
title
: 'A dynamically loaded dialog'
});
}
Tried to close with$('#dialog').parent().dialog('close');
and$('#dialog').dialog('close').dialog('destroy').remove();
but did not work