JavaScript rollover code - separated JS from HTML
This page includes HTML to be used together with 3-rollover.js JavaScript roll-over
code. Tested with FF2, IE7 and Opera 9 on Windows.
- This example is made in correct (fake) XHTML 1 transitional
and state of the art DOM 0 (for the events) and DOM 2 (for the
DOM surgery) code. Sometimes after IE 8 is out we can try a true
DOM solution. Anyhow, this example shows how to preload images
with JavaScript and then use these to make rollovers.
- Similar as 2-rollover.html but
strictly separates JS from HTML
Code was inspired by Image handling and How to make correct rollover buttons with preload images and Tom Negrino's JavaScript and AJAX 6th ed. See ch. 4. My contribution was to use indexed arrays (objects) to separate file names from attribute names.
Logos were taken from Creative commons.org and mediawiki. Btw most of the stuff I put on the web is somewhat free. Simple scripts I made may be freeware, others may retain the original copyright (since I didn't make them) and still others will have a form of creative commons.
Made by DKS/TECFA. If you are looking for good JavaScript links, go to
JavaScript links / EduTech Wiki.
Last modified: Sun Apr 13 19:25:46 Europe de l'Ouest (heure d'été) 2008