dialog widget - best practices?
- I'm doing something bad I think...Have started using the dialog widget more and more, I like it.I've learned to recycle it, which minimizes the amount of Java Script I have to write so my JS files stay on the smaller side.I had been using the dialog box like this:- When a page loads I would initialize the dialog box, but it is hidden.- I would show() the dialog when I needed it.Then I started renaming the buttons on the fly, and destroying buttons when no longer needed.All was good...I was just reinitializing the dialog when I wanted to reset it back to the default (original button layout etc.)It worked in IE and FF no problem, but I found Chrome did not like the way I was doing it. Only then did it dawn on me that I might be doing something wrong.So my question is, what is the proper way to reset a dialog back to default? I was thinking of destroying it every time... but have to wonder if that is the proper way as well?Anyone have some best practices for dialog use they would like to share?Thanks,Robert G.