title: how to trigger jquery function when field automatically filled?
body: <p>I have created an order form with multiple lines and columns
  <code>Product_id  Qty  price</code></p>
  
  <p>Quantity and price are automatically filled out when <code>Product</code> is chosen in a drop down list.</p>
  
  <p>At the end of the form, I have a field that sore the total amount <code>&lt;span id="total"&gt;&lt;/span&gt;</code></p>
  
  <p>I made the code below to calculate the total amount of the order but it doesn't work when <code>qty</code> and <code>price</code> are automatically filled. It does work if I type in <code>qty</code> or <code>price</code></p>
  
  <pre><code>jQuery(function($) {
      $(".qty, .price").change(function() {
          var total = 0;
          $(".qty").each(function() {
              var self = $(this),
                  price = self.next(".price"),
                  subtotal = parseInt(self.val(), 10) * parseFloat(price.val(), 10);
              total += (subtotal || 0);
          });
          $("#total").text(total);
      });
  });
  </code></pre>