jtsage/jquery-mobile-simpledialog — pull request #40 by evgenyneu (2012-02-14 10:47:16+00:00)
Title: Removing dialog from DOM on full screen mode

Hi,

This fixes 2 issues for me.

1) After closing the dialog remained in DOM in full screen mode (when useDialog === true). Moreover, it polluted DOM each time I open/close the dialog, so it accumulated. I am using it on one-page application build with backbone.js and need to make sure the DOM is cleaned properly.

2) The following code caused a nasty visual glitch in full screen mode: just before closing, it removed the content portion of the dialog, so it shrank to just a title bar and blank content and remained this way for a second before closing. So I removed it as well for `cleanOnClose` mode:

```javascript
self.pickerContent.addClass('ui-simpledialog-hidden');
self.thisPage.append(self.pickerContent);
```

I definitely done everything wrong, please advise if there is a better approach to fix these two bugs.

Thank you for your work. Cool plugin.

---
Evgeny