This isn’t really as much a how to as a copy and paste job but as long as it works for you hopefully you’ll be happy.
Step 1:
Open up your desired vB template or html file. Add the JS opening tags:
<script type="text/javascript"><!--
Now we need to define the actual image loading function:
function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; }}
Next we define the “other” image preloading function.
var preloadFlag = false;function preloadImages() { if (document.images) { image = newImage("X"); preloadFlag = true; }
}
Change X to the path of your image.
Then finish off the JS:
//--></script>
Now you need to trigger the image preloader to do that you need to put the following in your <body> tag:
onload="preloadImages();"
And your done
