How to preload your web image?

In one of my website, when user hover his mouse on a menu image, the image is replaced by a hover menu image. This cause  minor performance lag, because when the user hover his mouse, the image has to be reloaded.

There have been many ways of preloading images to prevent this lag.  One elegant way of doing this is by using css. You have to add your css file :

.preloadimage { display:none; }

 , and add to your html/php code: 

<img src=”images/pic1.jpg” class=”preloadimage” />
Sep 9, 2008 by
GreenGeeks WP Web Host ad ad ad ad