title: Multiplying two dropdown values results in NaN with one value
body: <ol>
  <li><p>I have a simple function that monitors for '<strong>change</strong>' in two dropdown fields, then multiplies both values to display the sum total which is updated live while using the form.</p></li>
  <li><p>Using bootstrap selectpicker -- there is no default selection, and therefore no value before a selection is made in the dropdown field.</p></li>
  <li><p>When the first of dropdown selections is made, the change is detected and the value is multiplied against a non-value. Thus resulting in a NaN output.</p></li>
  </ol>
  
  <p><strong>How can I output the total only after both dropdown fields are selected?</strong></p>
  
  <p><strong><a href="https://jsfiddle.net/cvpbnjeo/1/" rel="nofollow">JSFiddle example here.</a></strong></p>
  
  <pre><code>&lt;label&gt;Group Size&lt;/label&gt;
  &lt;select class="selectpicker group calculate" id="group" name="group" data-rule-required="true" title="Choose Group Size..."&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;label&gt;Price&lt;/label&gt;
  &lt;select class="selectpicker price calculate" id="price" name="price" data-rule-required="true" title="Choose Price..."&gt;
  &lt;option value="10"&gt;Option A: $10&lt;/option&gt;
  &lt;option value="20"&gt;Option B: $20&lt;/option&gt;
  &lt;option value="30"&gt;Option B: $30&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;label&gt;Total Sum:&lt;/label&gt;
  &lt;input name='total' id='total' disabled='true' data='' /&gt;
  
  $('.calculate').change(function(){
      var group = parseInt($('.selectpicker.group').val());
      var price = parseInt($('.selectpicker.price').val());
      var total = group * price;
      $('#total').val('$' + total);
  });
  </code></pre>
  
  <p><em>The NaN Error:</em></p>
  
  <p><a href="https://i.stack.imgur.com/rptXQ.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/rptXQ.jpg" alt="NaN Error"></a></p>