{"issue":{"user":{"id":75190,"login":"derickbailey","url":"https://api.github.com/users/derickbailey","gravatar_id":"e592bd1326b1e80188ed4c0bf26b9f75","avatar_url":"https://secure.gravatar.com/avatar/e592bd1326b1e80188ed4c0bf26b9f75?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"created_at":"2011-12-22T16:25:15Z","title":"Change bindings to use jQuery's `delegate`","state":"open","updated_at":"2011-12-22T16:35:40Z","labels":[],"id":2638862,"closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/derickbailey/backbone.modelbinding/issues/47","body":"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`. \r\n\r\nThis 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. \r\n\r\nTo 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.\r\n\r\nhttp://api.jquery.com/delegate/\r\n\r\nand \r\n\r\nhttp://api.jquery.com/undelegate/","number":47,"url":"https://api.github.com/repos/derickbailey/backbone.modelbinding/issues/47","comments":1,"assignee":null},"comment":{"user":{"id":224111,"login":"paulyoder","url":"https://api.github.com/users/paulyoder","gravatar_id":"0344a32b8285612a53d0a13d39527af8","avatar_url":"https://secure.gravatar.com/avatar/0344a32b8285612a53d0a13d39527af8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-22T16:35:40Z","updated_at":"2011-12-22T16:35:40Z","id":3251070,"body":"I noticed the following blurb while reading jQuery's delegate() documentation\r\n\r\n> As of jQuery 1.7, .delegate() has been superseded by the .on() method. For earlier versions, however, it remains the most effective means to use event delegation. More information on event binding and delegation is in the .on() method.\r\n\r\nShould we worry about what version of jQuery is being used, and if it's 1.7 or higher to use on() instead of delegate?\r\n\r\nBackbone still uses the delegate() method though","url":"https://api.github.com/repos/derickbailey/backbone.modelbinding/issues/comments/3251070"},"action":"created"}