I have a for loop to generate a row of divs, my code is
for(j=0; j<7; j++) {
$('<div/>', {
id: 'unique',
html: 'whatever'
}).appendTo('#container');
This code seems to seek out #container for every iteration and appends a new div to it.
How do write the code so that I can go create all the divs first and then append to the container all at once? Sorry, I tried searching for keywords such as concatenate/group/add jquery objects, and don't seem to have the right search results.
TIA
appendToonce?