title: jQuery- Do we have something like "OnBeforeSomeEvent"?
body: <p>Do we have any event like "onBeforeSomeEvent" in jQuery?</p>
  
  <p>For Ex, </p>
  
  <pre><code>&lt;input type='button' class='confirmdelete' onclick='delete();' value='DELETE' /&gt;
  </code></pre>
  
  <p>Now I want to show a custom dialog for confirmation. (I don't want to use default confirm method in JavaScript). </p>
  
  <p>So I need something like, </p>
  
  <pre><code>$('.confirmdelete').onBeforeClick(function() {
       if(true) //I show the custom dialog here and check some conditions. 
          return true;
       return false;
  });
  </code></pre>
  
  <p>The <code>onclick</code> event should fire if I get 'true' from the onbeforeclick event. </p>
  
  <p>Sorry, If I am confusing. May be like <code>beforeActivate</code> in Accordion.</p>