Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Image Effects >> Preload Images


Code Snippet </> Info


Snippet Name: Preload Images

Description: Speed up pages by preloading images for mousehovers and/or for onClick div layers.


Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Note: Insert as many preload image lines as needed.
var home-roll = new Image();
home src="http://yourdomain.com/image_mousehover2.jpg"


Author: SnapBuilder <snippets@snapbuilder.com>

Last Modified: 2015-12-13 06:42:04

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<html> <head> <title>Preload Images Javascript Code Snippet</title> <script language="javascript"> <!-- // Begin Preload Images // == This Script Free To Use Providing This Notice Remains == // // == This Script Has Been Found In The http://snapbuilder.com Free Public Codes Library == // // == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == // --> var home = new Image(); home src="http://yourdomain.com/image_mousehover1.jpg" var home-roll = new Image(); home src="http://yourdomain.com/image_mousehover2.jpg" </script> </head> <body> [ YOUR CONTENT GOES HERE ] </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library