Skip to content

Instantly share code, notes, and snippets.

@EragonJ EragonJ/gist:3773721

Created Sep 24, 2012
Embed
What would you like to do?
$(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
You can’t perform that action at this time.