title: How to create custom event in jQuery
body: <p>Hi
  I'd like to describe a scenario I'd like to accomplish, and I have no idea how to</p>
  
  <p>I'd like to bind\live on an element to a custom 'myclick':</p>
  
  <pre><code>$('#somediv').bind('myclick', function() {});
  </code></pre>
  
  <p>obviously, I'd like to trigger this event only when something happens to that element, 
  e.g. if myclick has occurred on that element </p>
  
  <p>I know how to trigger a custom event on a specific element (<a href="http://api.jquery.com/category/events/event-object/" rel="nofollow">http://api.jquery.com/category/events/event-object/</a>)</p>
  
  <p>Clarifications to the question:<br>
  I will define what does myclick mean (e.g. 3 clicks in a row on that element)<br>
  how can I tell when it happened on 'somediv' ?<br>
  Do I somehow register via jquery to elements that did bind\live on them? if so, how?</p>
  
  <p>a complete example is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
     &lt;script to include jquery&gt;
     &lt;script to include MYCODE.js&gt;
  
     &lt;script&gt;
       $('#somediv').bind('myclick', function() { alert('myclick'); } );
     &lt;/script&gt;
  
     &lt;body&gt;
        &lt;div id='somediv'&gt;&lt;/div&gt;
     &lt;/body&gt;
  &lt;head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>so my question is: what does MYCODE.js contain?<br>
  how can it tell that some custom logic that it defines, happened on 'somediv' ?  </p>
  
  <p>Thanks for your help</p>