DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Preloading Images With JQuery

  • submit to reddit
        Taken from

jQuery.preloadImages = function() {
	for (var i = 0; i < arguments.length; i++) {
		jQuery("<img>").attr("src", arguments[i]);


Uzbek Jon replied on Mon, 2009/04/06 - 9:40am

This is a good article on preloading images using jQuery. if you need more detailed explanation please refer to this article