title: How do I detect a jQuery trigger events completion?
body: <p>I'm trying to trigger a second event dependent on the first like so:</p>
  
  <pre><code>...
  $('#productFamilyId').val(data.contents.productfamily);
  $('#productFamilyId').trigger('change', function() {
      $('#productId').val(data.contents.product);
      $('#productId').trigger('change');
  });
  </code></pre>
  
  <p>It's not waiting for the first trigger to complete before attempting to trigger the second event.  Is it possible to wait for the first trigger to complete?</p>