title: Custom events in jQuery
body: <p>I'm trying to utilize jQuery's custom events. On DOM load I bind <code>body</code> to a custom event <code>test</code> using <code>$.on()</code>. Immediately after, I fire that event and everything runs as planned. However, any other time I fire the event (on a callback, from the console, etc.), nothing happens. I've written a jsfiddle to illustrate this situation. Any ideas?</p>
  
  <pre><code>$(function(){
      $('body').on('test', function(){
          alert('test triggered'); 
      });
      $('body').on('click', '.btn', triggerTest);
      $('body').trigger('test');    
  });
  
  var triggerTest = function(){
      $('body').trigger('test');
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/vgEzD/" rel="nofollow">http://jsfiddle.net/vgEzD/</a></p>