css3 preload images code example
Example 1: preload images javascript
<script>
/*
Preload images script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
preloadimages("http://mydomain.com/firstimage.gif","http://mydomain.com/secondimage.gif","http://mydomain.com/thirdimage.gif")
</script>
Example 2: how to load css background image pre
div#preload {
display: none;
}