Inheriting jQuery's Events Model
<p>I'm developing an SDK for a site API which depends on jQuery and I'd like to utilize jQuery's custom events model within the SDK.  How can I best inherit, wrap, or otherwise utilize jQuery's events without requiring an arbitrary DOM element to attach them to?</p>

<p>Current basic structure is below:</p>

<pre><code>;(function($, global, undefined){

  function MySDK(opts){

  }

  MySDK.prototype.on = function(evt, fn){};
  MySDK.prototype.trigger = function(evt, data){};

  if(global.MySDK){
    throw new Error("MySDK has already been defined");
  }else{
    global.MySDK = MySDK;
  }
})(jQuery, typeof window === "undefined" ? this : window);
</code></pre>
