derickbailey/backbone.modelbinding — Issue #47: Change bindings to use jQuery's `delegate`
Author: derickbailey
Created: 2011-12-22 16:25:15+00:00
State: open

Currently, the HTML has to be rendered for the bindings to be attached. This means you have to wait until after the render method has done it's magic to call `Backbone.ModelBinding.bind`.

This also means that every single element in the HTML being rendered will be examined and will have events attached to it, when needed. In a large form, this could lead to performance problems by having too many events being handled in too many places.

To solve the potential performance issue, and to make it easier to call the model binding when you want to instead of after the rendering happens, the bindings should be changed to use jQuery's `delegate` events instead of standard events.

http://api.jquery.com/delegate/

and

http://api.jquery.com/undelegate/