I have a view which has a view inside it (the same view in fact, its recursive). I want only the internal view to handle the event from an ‘a’ onclick event. I tried to do this by specifying only the direct children in the selector, but it doesnt work.
iv tried:
events: {
'click >a': 'toggle'
},
and
events: {
'click > a': 'toggle'
},
but they dont work, any suggestions? (Note: doing things like using tags and classes wont work because the view is recursive (meaning that both the inner and outer have the same event definitions)
I have run into the same issue, and have solved it by stopping the propagation of the event in my child view. For example…
This does not answer your question of how to specify specific child selectors, but it keeps the event from propagating up to other handlers.