$(this).dialog('destroy').remove()
This will destroy the dialog and then remove the div that was “hosting” the dialog completely from the DOM
$(this).dialog('destroy').remove()
This will destroy the dialog and then remove the div that was “hosting” the dialog completely from the DOM