Link to us
Web Design Toolbox
Home : Image Effects: Image Rollovers
This is probably the smallest image rollover script I've ever seen. You have two lines to preload all your images, and then just a small bit of script in each link to create your rollovers. Very elegant, and easy to set up.
First, you must name all your images, like so:
<img border=0 name="imagename" src="off.gif" width="100" height="68">
Then, set up your links:
<a href="link.htm" onMouseOver="imagename.src='on.gif'" onMouseOut= "imagename.src='off.gif'">
If you wanted to swap several images you would set your links like this:
<a href="link.htm" onMouseOver="imagename.src='on.gif'; imagename2.src='on2.gif " onMouseOut= "imagename.src='off.gif'; imagename2.src=off2.gif ">
Site designed, coded, and maintained by Web Shorts Site Design.