title: How can I "reset" <div> to its original state after it has been modified by JavaScript?
body: <p>I have a DIV with a form in it. When users submit the form and it gets successfully submitted, I replace the form with a simple "everything is good now" message:</p>
  
  <pre><code>$("#some_div").html("Yeah all good mate!");
  </code></pre>
  
  <p>Is there a good way to "reset" the div to its "original state" as per the HTML it has arrived with? I can only think of actually doing something like this:</p>
  
  <pre><code>//before I change the DIV
  var originalState = $("#some_div").html();
  //manipulate the DIV
  //...
  //push the state back
  $("#some_div").html(originalState);
  </code></pre>
  
  <p>It doesn't look very elegant - I guess there is a better solution for this, no?</p>