title: Swap two html elements and preserve event listeners on them
body: <p>There are similar questions, but all the answers are for swapping html elements only for the content inside.</p>
  
  <p>I need to swap two divs, with lots of content in them (tables, select boxes, inputs, etc.).
  The elements have event listeners on them, so I need to preserve them after swapping the main divs.</p>
  
  <p>I have access to jQuery 1.5. So answers with it are OK.</p>