Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1a356d

Browse files
committed
Add a $ to the documentFragment exemple to generate the dom fragment before appendChild
1 parent 9bff15b commit d1a356d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-patterns/append.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// documentFragment off-DOM
2121
var frag = document.createDocumentFragment();
2222
$.each(reallyLongArray, function(count, item) {
23-
var newLI = '<li>' + item + '</li>';
23+
var newLI = $('<li>' + item + '</li>');
2424
frag.appendChild(newLI[0]);
2525
});
2626
$('#ballers')[0].appendChild(frag);

0 commit comments

Comments
 (0)