When an ajax operation fails, I create a new div with the errors and then show it as a dialog. When the dialog is closed I would like to completely destroy and remove the di
This is worked for me
$('We failed') .dialog( { title: 'Error', close: function(event, ui) { $(this).dialog("close"); $(this).remove(); } });
Cheers!
PS: I had a somewhat similar problem and the above approach solved it.