pre-loading of images is especially useful when the images are huge and at the time of use/display you just want it to appear without any delay. The following simple jquery allows to pre load images
jQuery.preloadImages = function()
{
for(var a = 0; a ").attr("src", arguments[a]);
}
};
// Usage
$.preloadImages("img1.jpg", "/different/path/im2.gif", "other/img3.png");
{
for(var a = 0; a ").attr("src", arguments[a]);
}
};
// Usage
$.preloadImages("img1.jpg", "/different/path/im2.gif", "other/img3.png");