How to implement preloading (so that the site does not load until all the pictures are loaded).
I found this solution but it does not work.
function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('<img/>')[0].src = this; }); } preload([ 'img/1.jpg', 'img/3.jpg', 'img/2.jpg' ]);