title: jquery replace content remove nested autocomplete
body: <p>when replacing content of target by similar content newContent:
      <code>target.html(newContent.html())</code>
  the autocomplete attached to a nested DOM of target does not get completely removed so I cannot reattach a new autocomplete to the corresponding element in newContent.</p>
  
  <p>As in documentation of jquery it should remove all handlers and events, but of parent elemnt only!? how to remove all handlers and events of all nested DOMs (not just first-level children of <code>target</code>) as well?</p>
  
  <p>I have similar problems with dialogs.
  Neither <code>.empty()</code> or <code>.remove()</code> seem to work as well</p>