function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('')[0].src = this; }); } preload([ ]);