title: Trigger change event on document ready
body: <p>i want to re-calculate everything not only on change, but also when the page loads.</p>
  
  <p>i tried the following:</p>
  
  <pre><code>$(document).ready(function () {
  
      //trigger misc costs
  
          $("input[class~='miscc']").trigger('change');
          $("input[class~='misch']").trigger('change');
  
  
  //other events here....
  
      //add up repeater miscaleneous mnumbers
      //dollar amoungs
      $("input[class~='miscc']").change(function (event) {
          //only allow numbers
          this.value = this.value.replace(/[^0-9\.]/g, '');
  
          var sum = 0;
          var num = 0;
          $("input[class~='miscc']").each(function (event) {
              num = parseFloat($(this).val()) || 0;
              sum = sum + num;
          });
          $("input[id*='txtMiscC']").val(sum.toFixed(2));
          $("input[class~='cost']").trigger('change');
      });
  
      //hours
      $("input[class~='misch']").change(function (event) {
          //only allow numbers
          this.value = this.value.replace(/[^0-9\.]/g, '');
  
          var sum = 0.00;
          var num = 0;
          $("input[class~='misch']").each(function (event) {
              num = parseFloat($(this).val()) || 0;
              sum = sum + num;
          });
          $("input[id*='txtMiscH']").val(sum.toFixed(1));
          $("input[class~='hours']").trigger('change');
      });
  });
  </code></pre>
  
  <p>but nothing is happening, am i doing it wrong?</p>