Skip to content

Instantly share code, notes, and snippets.

@ovaillancourt
Created June 6, 2012 19:08
Show Gist options
  • Save ovaillancourt/2883999 to your computer and use it in GitHub Desktop.
Save ovaillancourt/2883999 to your computer and use it in GitHub Desktop.
var Evented = function(){
this._ev = $({});
}
Evented.prototype.on = function(){
this._ev.on.apply(this._ev, arguments);
return this;
}
Evented.prototype.off = function(){
this._ev.off.apply(this._ev, arguments);
return this;
}
Evented.prototype.trigger = function(){
this._ev.trigger.apply(this._ev, arguments);
return this;
}
module.exports = Evented;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment