jquery/jquery-ui — pull request #551 by AlbertoMonteiro (2011-12-13 18:38:35+00:00)
Title: Now the destroy method of the dialog will append himself previous location[updated]

When you destroy the dialog she did not return to their place of origin.
Now the destroy method of the dialog will append himself previous location.
This new logic dont use options and avoid universal selectors.
I tested the performace with previous version vs this new one, and there is better.
I had looked at replaceWith, but there are some cases that replaceWith logic will not cover, only indexed logic cover.