Skip to content

Instantly share code, notes, and snippets.

@gurdotan
Created October 31, 2012 12:42
Show Gist options
  • Save gurdotan/3986841 to your computer and use it in GitHub Desktop.
Save gurdotan/3986841 to your computer and use it in GitHub Desktop.
Backbone View event bubbling
_.extend(Backbone.View.prototype, {
bubbleEventsTo : function(targetView) {
this.on("all", function() {
Backbone.View.prototype.trigger.apply(targetView, arguments);
});
return this;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment