Created
July 14, 2012 17:44
-
-
Save akgupta/3112330 to your computer and use it in GitHub Desktop.
docFrag append
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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