If you are using mouseover images for your navigation and want to prevent the lag time of the images loading before you can mouseover, then using a image “preloader” script is the way to go.
Add the following Javascript snippet just above your closing head tag:
<html>
<head>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>
</head>
Then add the full url’s of the images you want to preload in the body tag.










Twitter updates
6 December 2009 at 4:26 pm
Hello, is it possible to preview the templates before installing them in Joomla (it’s zip file, so I don’t think so).
It’s easier to download a lot of templates at once from web but installing them one by one is time consuming. Is it possible to copy/paste them in template file like pictures and in that way avoiding entering them one by one, or preview them in some way.
Thanks and all the best
7 December 2009 at 4:44 pm
I think you would be hard presssed to find a web template company that did not have a preview and a demo of their goods.
11 June 2010 at 8:31 pm
hello matt, im new to joomla and I found it interesting. But there are some issues I want to know more like how can I make my website load faster. and specially the images. is there any image preloader for images? why joomla site load very slow? how can I speed it up?
11 June 2010 at 8:33 pm
does the pre-loader code you have above apply to any image?
thanks
Franklin´s last blog ..It’s Gonna Make Sense