Friday, February 24, 2012

Backbone.js Views events « Yoel Gluschnaider

Backbone.js Views events « Yoel Gluschnaider: "Tapping this element would just not work! You need to bind the tap event manually after the element is added to the view, so instead of writing this:

events: {'tap .class1': 'eventHandler'}
Which will cause this call:

$(this.el).delegate('.class2', 'tap', method);
You should call this:

$(this.el).find('.class2').tap(this.eventHandler);"

'via Blog this'