title: jQuery ".triggerHandler()" vs. ".trigger()" when multiple elements are selected
body: <p>The jQuery ".triggerHandler()" mechanism, unlike ".trigger()", only operates on the first element referenced by the jQuery object for which it's called.  In other words,</p>
  
  <pre><code>$('.all-over-the-page').triggerHandler("readjust");
  </code></pre>
  
  <p>will only call the "readjust" handler for the first element with class "all-over-the-page", even if there are many elements on the page with that class.  The ".trigger()" method, on the other hand, would affect all of them.</p>
  
  <p>I realize that I can use ".each()" to get around this (or simply write my own substitute that does that for me), but is there some rationale for why the two are different in this respect?  It kind-of makes no sense to me.  (I understand of course that it almost certainly can't be changed now.)</p>
  
  <p><em>edit</em> to clarify:</p>
  
  <p>It's probably easier to understand why I'm scratching my head over this if I provide a context in the style of code I've actually got.  When I put together code for various "widget" features on a page, that often involves event handlers. A good example is a form of some sort that's got some fields whose relevance is controlled by a checkbox, or radio button, or selector. A common instance of that is the "Shipping Address" checkbox that shows up on a zillion e-commerce sites: if the checkbox is checked, the shipping address is disabled and the billing address is used.</p>
  
  <p>Now consider that some <em>other</em> code may, for its own reasons that are totally independent of the checkbox-control widget, actually do things to the form that may include updating checkbox settings programmatically. In that case, that other widget code may want to use "triggerHandler()" to tell any widgets, "hey I've updated some stuff, so you might want to re-check the current status and adjust if necessary."</p>
  
  <p>Thus, if ".triggerHandler()" would operate on all selected elements, I could use:</p>
  
  <pre><code> $theForm.find('input, select, textarea').triggerHandler('change');
  </code></pre>
  
  <p>and all those handlers could run and do whatever they need.  As I said, it's easy enough to write:</p>
  
  <pre><code> $theForm.find('input, select, textarea').each(function() {
     $(this).triggerHandler('change');
   });
  </code></pre>