I\'m trying to use the append function and encountered this:
$(\"#details\").append(\'\');
for (var i = 0; i < 10; i++) {
$(\"#details\").ap
I think there's a problem in your loop
for (var i = - i < 10; i++)
$("#details").append('- something
');
should be I think
for (var i = 0; i < 10; i++)
$("#details ul").append('- something
');
and lose the following from the end
$("#details").append('');
Working Demo
EDIT:
Based on George IV's comment, in order to avoid appending elements to any
that may be a child of the element with id "details", simply give the
element an id when you append it-
$("#details").append('');
for (var i = 0; i < 10; i++)
$("#appended").append('- something
');
you may also find this article interesting - 43,439 reasons to use append() correctly