title: jQuery custom event
body: <p>Why isn't this being triggered?</p>
  
  <pre><code>$('#nav').bind('app:event', function (event, status) {
    console.log([event, status]);
  });
  </code></pre>
  
  <p>when this is:</p>
  
  <pre><code>$(document).bind('app:event', function (event, status) {
    console.log([event, status]);
  });
  </code></pre>
  
  <p>the event is being fired using:</p>
  
  <pre><code>$(this).trigger('app:event', [options]);
  </code></pre>
  
  <p>from within a plugin.</p>
  
  <p>This is the entire block:</p>
  
  <pre><code>﻿/* App.js */
  $(function ($) {
  
    // UI Panels
    $('#panels').panels({
      controls: '#nav a'
    });
  
    $('#nav').bind('app:event', function (event, status) {
      console.log([event, status]);
    });
  
  });
  
  /**
   * Plugin dir
   */
  (function($) {
    // Interface
    $.fn.panels = function (options) {
      var settings = {}, current;
  
      if (options) {
        $.extend(settings, options);
      }
  
      // Setup
      $('.panel', this).hide();
      $('.panel:first', this).slideDown('slow');
  
      return this.each(function () {
        var self = $(this);
  
        $(settings.controls).click(function () {
          // Get reference
          current = this.href.substring(this.href.indexOf('#') + 1);
  
          // Hide all
          $('.panel', self).hide();
          // Show current
          $('#'+ current)
            .publish({            
              'panelReady': current
            })
            .slideDown();
  
          return false;
        });
      });
    };
  
    // Publish event
    $.fn.publish = function (options) {    
      var settings = {
        origin: this      
      };
  
      if (options) {
        $.extend(settings, options);
      }
  
      return this.each(function () {
        $(this).trigger('app:event', [options]);
      });
    };
  
  }(jQuery));
  </code></pre>
  
  <p>I'm trying to implement something like a suplish/subscribe/observer like solution where a #id can subscribe to events</p>