title: how to catch delegated events with .triggerhandler
body: <p>We attach our event handlers using jQuery for DOM elements either</p>
  
  <p>1)directly — </p>
  
  <pre><code>    $(#elemId).bind("click",function(){ …//event handler code}); OR
  </code></pre>
  
  <p>2) by delegation. — </p>
  
  <pre><code>         $(document).delegate("#elemId","click",function(){ …//event handler code});
  </code></pre>
  
  <p>We also come accross a situtation whereby we need to execute these attached event handlers manually from our code. To do this we can use either
  .trigger() API in jQuery on the element.</p>
  
  <pre><code>       $(#elemId).trigger("click") 
  </code></pre>
  
  <p>In some scenarios we only want to execute the event handlers we attached but we do not want to execute the default action that is associated with that event. We can acheive this by using .triggerHandler() API in jQuery on element</p>
  
  <pre><code>$(#elemId).triggerHandler("click");
  </code></pre>
  
  <p>e.g. we can attach "click" event on a list of "checkboxes" and we can execute an event handler when any of the checkboxes are checked/unchecked. Here the default action of click event for a checkbox is that either that checkbox gets checked /uncehcked(i.e. that status of the checkbox changes.)
  So. in some scenarios we might not want to change the status of the checkbox when it is clicked but we would like to execute the code in our event handler.As explained aboce this can be achieved in jQuery by calling .triggerHandler() instead of .trigger() to fire the event.</p>
  
  <p>However this does not work when we attach event to a DOM element by delegation.
  What is the other way to execute event handlers without executing default action in case of event delegation?</p>
  
  <p>Please check the difference in following JSfiddles:
  for direct event handling : </p>
  
  <pre><code>       http://jsfiddle.net/g2TWh/7/
  </code></pre>
  
  <p>for delegated event handling : </p>
  
  <pre><code>        http://jsfiddle.net/g2TWh/8/ 
  </code></pre>
  
  <p>(Note that alert in event handler function does not appear when you click "Run")</p>