Skip to content

Instantly share code, notes, and snippets.

@EragonJ
Created September 24, 2012 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EragonJ/3773721 to your computer and use it in GitHub Desktop.
Save EragonJ/3773721 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
for (var i = 0; i<= 50; i++) {
console.log(i);
$(document.body).append((function() {
console.log('appending');
return $("div");
})());
}
});
/*
Result :
0
appending
1
appending
2
appending
... etc
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment