I've seen the file, preloadmenuimages.js, mentioned in a few threads recently, where the virtues of preloading your menu images have been discussed. But there really aren't any clear-cut instructions for how to use this file. So, I thought I'd provide some, for those who come looking...
(1) Download preloadmenuimages.js from Milonic, then put it on your web server. It probably makes most sense to put the file in the same location as your menu_data.js file (or whatever you call yours).
(2) Load preloadmenuimages.js into your page at some location after your menus have been defined (i.e., after all the aI() stuff), so that the preload function knows what images it needs to get. For most, that means load preloadmenuimages.js after you load menu_data.js, like this:
Code: Select all
<script language=Javascript src="menu_data.js" type=text/javascript></script>
<script language=Javascript src="preloadmenuimages.js" type=text/javascript></script>
Hope that helps,
Kevin
Keywords:
preload preloading precache images