title: Append text in a span to hidden input
body: <p>I have a span (#sum) which changes dynamically, adding up the values of selected options in a form. I want to append the text from this to the value of a hidden input field so I can email the figure.</p>
  
  <p>So my html is</p>
  
  <pre><code>&lt;span id="sum"&gt;£0.00&lt;/span&gt;
  </code></pre>
  
  <p>and my hidden field is</p>
  
  <pre><code>&lt;input type="hidden" name="total" value=""  /&gt;
  </code></pre>
  
  <p>But using jQuery that needs to read </p>
  
  <pre><code>&lt;input type="hidden" name="total" value="[WHATEVER THE NUMBER IN THE SUM SPAN IS]"  /&gt;
  </code></pre>
  
  <p>Here is the jQuery I have so far:</p>
  
  <pre><code>var total = $('#sum').html();
      $('#total').val(total);
  </code></pre>