Skip to content

Instantly share code, notes, and snippets.

@JPGygax68
Last active September 18, 2017 19:35
Show Gist options
  • Save JPGygax68/5990313 to your computer and use it in GitHub Desktop.
Save JPGygax68/5990313 to your computer and use it in GitHub Desktop.
Oz Katz' (thanks!) single-reflow #Backbone #collection render()
render: function() {
this.$el.empty();
var container = document.createDocumentFragment();
// render each subview, appending to our root element
_.each(this._views, function(subview) {
container.appendChild(subview.render().el)
});
this.$el.append(container);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment