title: Calculate price with amount of quantity
body: <p>I have a web page for employees where they can choose an item from a dropdown and it will automatically input the price of that item for them. Here is my code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
  
    $('#price_input').on('change', function() {
      $selection = $(this).find(':selected');
      $('#opt_value').val($selection.val());
      $('#opt_price').val($selection.data('price'));
    });
  });
  &lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;select id="price_input"&gt;
    &lt;option value="Coffee" data-price="3.00"&gt;Coffee&lt;/option&gt;
    &lt;option value="Chips" data-price="0.75"&gt;Chips&lt;/option&gt;
    &lt;option value="Soda" data-price="2.50"&gt;Soda&lt;/option&gt;
  &lt;/select&gt;
  &lt;div&gt;Option Value &lt;input type="text" id="opt_value"/&gt;&lt;/div&gt;
  &lt;div&gt;Option Price &lt;input type="text" id="opt_price"/&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The code works properly, but how would I be able to add a quantity input that defaults to 1 and when it is changed to two, the price doubles, and when it is changed to three the price triples in the "Option Price" input  for example.</p>