title: jQuery custom events on non-DOM objects
body: <p>I read some code recently that does something like this:</p>
  
  <pre><code>bob = {'name': 'Bob Smith', 'rank': 7};
  $(bob).bind("nameChanged", function () { /* ... */});
  // ...
  $(bob).trigger("nameChanged");
  </code></pre>
  
  <p>This appears to work.</p>
  
  <p>But I can't find anything in the jQuery documentation or source about calling the jQuery constructor with an object that is neither a selector nor a DOM node.  So my question is, is this a supported use, or is it essentially working by accident?</p>
  
  <p>If you wanted to use an event-driven model for your Model or View objects in JavaScript, how would you do it?</p>