I want to append a bunch of images to a div using Jquery:
elements = '';
for(var i = 0; i < 9; i++) {
elements = elements + '<img src=img' + i + '>';
}
$('#container').append(elements);
This looks terrible because it's showing each img being loaded one by one. Instead, I want to fade them in once all of them are loaded and rendered. They MUST be faded in together, not one by one.
I have tried:
$('#container').append(elements).hide(0).fadeIn(2000);
But that seems to start the fade in at the beginning of the process, not the end.
Any ideas from you good people? :)