/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> function preload() { if (document.images) { preload_image_object = new Array(); image_url = new Array(); image_url[0] = "images/Homepage/HomepageSquare_2.jpg"; image_url[1] = "images/Homepage/HomepageSquare_3.jpg"; image_url[2] = "images/Homepage/HomepageSquare_4.jpg"; image_url[3] = "images/Homepage/HomepageSquare_5.jpg"; image_url[4] = "images/Homepage/HomepageSquare_6.jpg"; image_url[5] = "images/Homepage/HomepageSquare_7.jpg"; image_url[6] = "images/Homepage/HomepageSquare_8.jpg"; image_url[7] = "images/Homepage/HomepageSquare_9.jpg"; image_url[8] = "images/Homepage/HomepageSquare_10.jpg"; for(var i=0, limit = image_url; i<limit; i++) { preload_image_object[i]=new Image(); preload_image_object[i].src = image_url[i]; } } } </script> <body onload="javascript:preload();">