JavaScript image preloader script

var myimages = new Array();

function preloading(){

for (x=0; x<preloading.arguments.length; x++)
{

myimages[x] = new Image();
myimages[x].src = preloading.arguments[x];

}

}

preloading(
‘images/1.jpg’,
‘images/2.jpg’,
‘and_so_on.jpg’)
;

Comments are closed.