title: Replace innerHTML and get back to the original one keeping the events
body: <p>I have a target div <strong>el</strong> with some components displayed. These components have some events attached (on mouse over, on click). I don't control this code neither those events. They are just there. I'd like to render a widget inside this div. To do so I'm doing something like:</p>
  
  <pre><code>var save = el.innerHTML; 
  el.innerHTML = "my widget code";
  </code></pre>
  
  <p>When my widget finishes its process I want to get back to the original content so I do:</p>
  
  <pre><code>el.innerHTML = save;
  </code></pre>
  
  <p>The components previously saved are correctly replaced but the events attached to them don't work anymore.</p>
  
  <p>I can't hide, show divs. I need to replace the innerHTML to have the exact style and positioning.</p>
  
  <p>What would you do in my case? 
  I'm using jQuery if it helps.</p>
  
  <p>Thanks.</p>