javascript - if I create jquery ui dialog on the fly , is there any clean up beside calling dialog("close") in a single page app? -
in single page web app, if create jquery ui dialog on fly this:
$("<div>hello</div>").dialog({ buttons : { "cancel" : function() { $(this).dialog("close"); } } });
do need special clean after each closing? need call dialog's "destroy"?
you should call destroy
if plan re-create dialog each time it's opened, happen code above called more once.
if dialog gets opened once, doesn't matter.
Comments
Post a Comment