Skip to content

Instantly share code, notes, and snippets.

@akgupta
Created July 14, 2012 17:44
Show Gist options
  • Save akgupta/3112330 to your computer and use it in GitHub Desktop.
Save akgupta/3112330 to your computer and use it in GitHub Desktop.
docFrag append
var div = document.getElementById("container");
var docFrag = document.createDocumentFragment();
for ( var i = 0; i < elems.length; i++ ) {
docFrag.appendChild( elems[i] );
}
div.appendChild(docFrag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment