title: Multiple input types sum
body: <p>I'm looking to sum multiple inputs together from select, radio and text.</p>
  
  <p>I have the following code, which works, but cancels out each different input, i'm looking to add them all together.</p>
  
  <p>I know there would be a better way to structure this, but I can't seem to work out a good solution.</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>    &lt;select&gt;
      &lt;option value='0.0'&gt;Product 1&lt;/option&gt;
      &lt;option value='0.5'&gt;Product 2&lt;/option&gt;
      &lt;option value='1.0'&gt;Product 3&lt;/option&gt;
      &lt;option value='0.5'&gt;Product 4&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;h4&gt;Desired price&lt;/h4&gt;
      &lt;input class="inputBox form-control" type="text" id="desired_price" &gt;
  
      &lt;form&gt;
      &lt;label class="radio inline"&gt;
      &lt;input type="radio" name="location" value="0.1" &gt; location 1
      &lt;/label&gt;
      &lt;label class="radio inline"&gt;
      &lt;input type="radio" name="location" value="0.1" &gt; location 2
      &lt;/label&gt;
      &lt;label class="radio inline"&gt;
      &lt;input type="radio" name="location" value="0.4" &gt; location 3
      &lt;/label&gt;
      &lt;label class="radio inline"&gt;
      &lt;input type="radio" name="location" value="0.7" &gt; location 4
      &lt;/label&gt;
      &lt;label class="radio inline"&gt;
      &lt;input type="radio" name="location" value="1.0" &gt; location 5
      &lt;/label&gt;
      &lt;/form&gt;
  
  &lt;b id="score_total"&gt;0&lt;/b&gt;
  </code></pre>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>$(document).ready(function() {
   var desiredPrice = document.getElementById("desired_price");
  
   desiredPrice.onkeyup = calc;
  
   function calc() {
    document.getElementById("score_total").innerHTML = parseFloat(desiredPrice.value).toFixed(1);
      }
  
   // All radios sum gathered
   $('input[type=radio]').change(function(){
   var total = 0;
   $('input[type=radio]:checked').each(function(){
    total += Number($(this).val());
   });
    $('#score_total').html(total);
   });
  
   // select
   $('select').change(function(){
    var variety = 0;
   $('select :selected').each(function() {
    variety += Number($(this).val());
   });
    $('#score_total').html(variety);
   });
  
  }); 
  </code></pre>