proper way to dynamically assign backbone.js view el
- by kikuchiyo
I would like to create two ( or more ) view instances, each with different el attributes, and have events bound to them via backbone.js view's events hash ( not through jQuery ).
Getting events to trigger when all instantiations have the same el is easy:
someView = Backbone.View.extend({
el: '#someDiv',
events: {
'click': 'someFunction'
…