title: How do I calculate onchange with keyup
body: <p>I have 3 input. Package - Total - Price</p>
  
  <p>How do I make the price will change too when the package is changed.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#the_total').keyup(function () {
      var the_total = $("#the_total").val();
      var get_package = $("#package").val();
      if (get_package == 'Package A') {
          var total = the_total * 100;
      } else {
          var total = the_total * 200;
      }
      $("#price").val(total);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;select id="package"&gt;
      &lt;option value="Package A"&gt;Package A&lt;/option&gt;
      &lt;option value="Package B"&gt;Package B&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type="text" id="the_total" name="total"&gt;
  &lt;input type="text" id="price" name="price"&gt;</code></pre>
  </div>
  </div>
  </p>