• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Hover menu

Nug

Mah Gituar Rox
NLC
I need a script/code that well change the image when the mouse is hovering over it.
can someone tell me the easist way to do this?
 
This is what I used;

HTML:
<a href="#" onmouseover="document.turtletech.src='images/site/turtletech_on.gif'" onmouseout="document.turtletech.src='images/site/turtletech_off.gif'">
<img src="images/site/turtletech_off.gif" name="turtletech" alt="turtletech" border="0"  /></a>

*on.gif is obviously the new image, *off is the old one.

Things to look at in there: onmouseover, onmouseout, and name=""

I also preloaded the *on.gif image simply by loading it earlier in the page.

HTML:
<img src="images/site/turtletech_on.gif" style="display:none;" width="1" height="1" alt="preload_turtletech" />

note width=1, height=1 and display:none

Hope this helps..
 
Back
Top