{"issue":{"state":"closed","created_at":"2011-12-04T19:10:37Z","updated_at":"2011-12-05T15:42:53Z","comments":1,"user":{"gravatar_id":"dc34e6bc81f6d84d650e28327ac4c0e0","id":965112,"url":"https://api.github.com/users/proxdeveloper","avatar_url":"https://secure.gravatar.com/avatar/dc34e6bc81f6d84d650e28327ac4c0e0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"proxdeveloper"},"body":"I'm using the suggested method of loading data models from the backend, to prevent fetching data from the server twice on a page load like this:\r\n\r\n```javascript\r\n<script>\r\n  collection.reset(<%= @accounts.to_json %>);\r\n</script>\r\n```\r\n\r\nThe issue is my models are being rendered in my php views, the code above just adds the models to the collection, therefore no views rendering is happening when collection.reset is called, however I do have a view for this model but it's only rendered when collection.add is called with some click events in it, so the click events are obviously  not being called with the already rendered html because backbone.js didn't render the views itself.\r\n\r\nIs there a way of taking the already rendered html tags and bind it to my views so the click events I have work for those tags ?\r\nCheers","assignee":null,"id":2443172,"labels":[{"color":"eb70b2","name":"question","url":"https://api.github.com/repos/documentcloud/backbone/labels/question"}],"number":774,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Collection Reset","closed_at":"2011-12-05T15:42:53Z","html_url":"https://github.com/documentcloud/backbone/issues/774","url":"https://api.github.com/repos/documentcloud/backbone/issues/774","milestone":null},"action":"closed"}