diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


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 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

Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...