code: function(type, callback) {
          if (!callback) {
              delete this.__hooks[type];
              return;
          }
  
          var hooks = this.__hooks[type];
  
          if (hooks) {
              $.each(hooks, function(i, hook) {
                  if (hook === callback) {
                      hooks = hooks.splice(i, 1);
                  }
              });
          }
      }
docs: Remove a hook within a type. If the callback is not provided, remove all hooks in that type.
  
  @param {String} type
  @param {Function} [callback]