I\'ve created a bunch of Backbone.js views. Each view has an associated element (view.el
).
Given an element on the page — out of context of the view — w
Every view can register for DOM events. As such, every view with the kind of element that you are interested in should register for the DOM event and then assign an event-responding function that does what you want. If you need to DRY things up, use mixin techniques to mix in the function.
I think maybe this solution is easier than you may have initially imagined. Just let the views do the work that they are intended to do.