I'm looking for ways to make the views independent. So, the events of a view are constrained to that view, not going into the elements of the children nor the parent.
The backbone.js framework binds the event on the top element of the view (view.el) using the jQuery .on method. As I have nested views, when I click on the button of view B, the event will be triggered on the view A also. I know that I can add a handler to the button click at view B and return false, but this way I need to know all events of the parent view and always handle all these events.
There follows an example of the problem: http://jsfiddle.net/57RAM/3/
I would like to click on MyViewB button and don't trigger the event of ViewA.
I've tried adding 'all': -> return false
in the events of view B, but it didn't worked.
Any suggestion?