Return to Snippet

Revision: 10844
at January 15, 2009 15:08 by conspirator


Initial Code
<script type="text/javascript" charset="utf-8">
	// JQUERY WAY TO PRELOAD IMAGES
	// DOES NOT NEED TO BE IN DOCUMENT READY
	$.preloadImages = function()
	{
	        for(var i = 0; i<arguments.length; i++)
	        {
	                img = new Image();
	                img.src = arguments[i];
	        }

	}
	$.preloadImages(
	"path/to/image/1",
	"path/to/image/2",
	"path/to/image/3"
	);
</script>

Initial URL

                                

Initial Description

                                

Initial Title
Preload images using jQuery

Initial Tags
textmate, jquery, ie6, images

Initial Language
JavaScript