What is the difference between .dialog(\"close\")
and .dialog(\"destroy\")
in jquery-ui?
I have a script where the previous developer had used
close
leaves the dialog configured, but invisible, so you can reopen it again with .dialog('open')
.
destroy
will completely deconfigure the dialog box. It'll remove all of the UI elements that were added to the DOM, and any related event handlers.
destroy
will not remove the element that held the contents of the dialog box (i.e. the element that you call .dialog
on)