The next generation of my basic rollover script. Installation is much simpler - just link to the script and any images in your page with the ending "_off" (ie, "home_off.png") will automatically be converted to a rollover. When a visitor moves their mouse over the image, it will be replaced by the "_on" version of the same image.
This script supports all(?) browsers that allow event handlers on the <img> tag. This includes IE4+, NS6+, Opera3+, and a whole bunch of other browsers but excludes NS3-4. Minimal installation is needed to support IE5+ Windows, NS6+, and Opera 7. An extra step is needed (see the installation instructions) if you want rollovers in IE4 Windows, IE4+ Mac, Opera 3-6.
Props to Byron ('cause I basically stole the idea for this script from him - he made one similar to it).
( Javascript 1.1 | JScript 2.0 | ECMAScript 1.0 ) & DOM 1
Posted.
Adjusted variable and function names to avoid namespace conflicts with other scripts.
Changed to a simpler script that requires fewer installation steps and less code.
Fix for Safari onload bug and an IE bug with image caching.
This script is released under a Creative Commons License.