background
|
|
Linux
Linux Support
A small area on the internet for Linux Support.
More icon

Computer
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Reference   JavaScript Code Library

If your page will be calling in images sometime after the page loads (for "rollover" effects, for example), it's important to preload the images so they'll appear instantly at the desired time instead of loading "as needed." The WM_preloadImages() function takes a list of images (which must be valid URLs, enclosed in quotes) as arguments and then caches them.

Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);

Example: <body onLoad="WM_preloadImages('header.gif','nav1.gif','foo.gif','scoob.gif');">

Cut, paste, and enjoy!