Skip to content

Instantly share code, notes, and snippets.

@sanderversluys
Created February 6, 2012 10:40
Show Gist options
  • Save sanderversluys/1751400 to your computer and use it in GitHub Desktop.
Save sanderversluys/1751400 to your computer and use it in GitHub Desktop.
Backbone.js Events
var object = {};
_.extend(object, Backbone.Events);
object.on("alert", function(msg) {
alert("Triggered " + msg);
});
object.trigger("alert", "an event");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment