Posts filed under ‘JavaScript’

Simple JavaScript Image Preloader

Add this code at the bottom of the page, creating a new variable for each image you wish to be preloaded.

function ImagePreloader( imgSrc )
{
    var preloadedImage = new Image;

    preloadedImage.src = imgSrc;

}

Cognize Web Design Services

May 5, 2008 at 4:18 pm Leave a comment


Calendar

August 2017
M T W T F S S
« May    
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category