title: jquery sum and subtract prices from checkbox with initial price
body: <p>So I have an initial value <code>$8.90</code> and the idea is to add a extra fee if a checkbox is selected. Each checkbox has the price in a data-price value, the problem goes when I click on a second checkbox. It should add the fee to the current value:</p>
  
  <p><strong>LIVE SCRIPT:</strong> <a href="http://jsfiddle.net/NF7x9/" rel="nofollow">http://jsfiddle.net/NF7x9/</a></p>
  
  <p><strong>JQUERY:</strong></p>
  
  <pre><code>$(document).ready( function() {
  
  var subt_value = parseFloat($('#subt0').text());
  var start_price = parseFloat($('#subt0').attr('data-original'));
  
          $("#ser1, #ser2").click(function(){
  
              var sub_total = 0
              var extra_fee = parseFloat($(this).attr('data-price')/1.12).toFixed(2);
  
  
              $(this).each(function(){
                  if($(this).is(":checked")){
                      var sub_total = subt_value + parseFloat(extra_fee);
                      $('#subt0').text(parseFloat(sub_total).toFixed(2));
                  }else{
                      $('#subt0').text(parseFloat(start_price).toFixed(2));
                  }
              });
  
  
          });
  
  });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;label id="subt0" data-original="8.90"&gt;8.90&lt;/label&gt;
  
  &lt;input name="service1" type="checkbox" id="ser1" data-price="1" value="1" title="Service 1" /&gt;
  &lt;input name="service2" type="checkbox" id="ser2" data-price="5" value="1" title="Service 2" /&gt;
  </code></pre>
  
  <p><strong>RESULT:</strong></p>
  
  <p>Starts with <strong>$8.90</strong>. If I select the checkbox with <code>ID=ser2</code> the price changes to <code>13.36</code> Now if I check the box with <code>ID=ser1</code> the total is <code>$9.79</code> when it should be <code>14.25</code></p>