Image Preloader MKII
The thumbnail display is only a visual reference for this example to show the images being preloaded.
A common mistake when preloading images is to simply create an Image object and assign a Source, but if the image is used before it has loaded, this preloading will have no effect at all. To make preloading work properly, the images have to complete loading before they are used.
Typical examples of this would be where images are shown at random or a slideshow script.
The Image Preloader MKII ensures that all images are downloaded before they can be displayed.
A couple of additional features are the ability to see how many images remain to be downloaded and the inclusion of a progress bar to let your visitor know that something is happening.
The preloader works by creating a new image object that is assigned an onload event so that when the current image has preloaded a function is run to check for the next image in the array.
Once all the images are preloaded your function is run.
If you want to preload in the background without the counter or progress bar comment out the appropriate lines
Diese Seite verwendet Frames. Frames werden von Ihrem Browser aber nicht unterstützt.