jQuery plugin to preload images

Scott Jehl over at Filament Group wrote a jQuery plugin that automatically preloads all images from any directory specified in the CSS. The script iterates through each rule in each stylesheet attached to the current page and if the rule's value contains an image URL, it loads the image, thus ensuring it's available in the cache when […]

Scott Jehl over at Filament Group wrote a jQuery plugin that automatically preloads all images from any directory specified in the CSS. The script iterates through each rule in each stylesheet attached to the current page and if the rule's value contains an image URL, it loads the image, thus ensuring it's available in the cache when used in the document.

To use it, just download the jQuery js code and run $.preloadCssImages(); when the DOM is ready. Don't forget that you'll also need to reference the jQuery javascript library in your page.

More info....

Source:→ Ajaxian