Preloading Images with jQuery
1 2 jQuery.preloadImages = function() { 3 for (var i = 0; i < arguments.length; i++) { 4 jQuery("<img>").attr("src", arguments[i]); 5 } 6 }
DZone Snippets > demods > preload image
12876 users tagging and storing useful source code snippets
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
1 2 jQuery.preloadImages = function() { 3 for (var i = 0; i < arguments.length; i++) { 4 jQuery("<img>").attr("src", arguments[i]); 5 } 6 }