Simple JavaScript Image Preloader

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

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

Advertisements

Entry filed under: JavaScript. Tags: .

Search Engine Optimization Easy Guide Simple C# Delegate Example

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

May 2008
M T W T F S S
« Mar    
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts


%d bloggers like this: