title: How to emit an event with jquery?
body: <p>i'm trying to create a simple class to emit an event in certain moment.
  I get this javascript error : this.emit is not a function</p>
  
  <p>This is the code:</p>
  
  <pre><code>var class_test = function(){};
  class_test.prototype = {
     some_property: null,
  
      doSomething: function(msg) {
              this.some_property = msg;
              this.emit("somethingHappened");
          }
  };
  
  
  var test = new class_test();
  test.doSomething('Example');
  
  test.addEventListener('somethingHappened',function(){
      alert("Event");
  },false);
  </code></pre>
  
  <p>Any suggestion?,Thanks!</p>