Bind the dialogclose event to the dialog, or just use the option:
$(".dialog").dialog({
close: function() {
// do cleanup
}
});
Jörn
On Sat, Aug 15, 2009 at 8:53 AM, strager<[email protected]> wrote:
>
> Hello,
>
> I'm trying to perform some cleanup when I close my jQuery UI dialog.
> However, the code which should clean up doesn't know about it being in
> a dialog. (It's an HTML file elsewhere and is loaded using Ajax.)
> I've tried binding the dialogclose event to document but it doesn't
> seem to be doing anything (handler isn't being called).
>
> How can I know when the dialog closes then clean up? Is there some
> static/global event I can add my handler to? (There will only be one
> dialog active at a time. It would be great if I could obtain the
> active dialog and bind the handler to that, just in case.)
>
> Thanks,
> Strager Neds
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---