Minimal rollover code - improved
Below is minimal JS roll-over code
- This example made in correct (fake) XHTML 1 transitional. It
shows how to preload 2x2 images in the header and also how to
substitute the source of an
<img name="xxxx" ... >
element in the
DOM. E.g. document.images['xxxx']
can be used.
- Code can be duplicated for more images, but it would be better to use arrays like in 2-minimal-rollover.html
Code is almost identical to Image handling and also was inspired by How to make correct rollover buttons with preload images.
Logos were taken from Creative commons.org. Btw most of the stuff I put on the web is one form or creative commons in various forms. Simple scripts I made may be freeware, but others may retain the original copyright (since I didn't make them).
Made by DKS/TECFA. If you are looking for good JavaScript links, go to
JavaScript links / EduTech Wiki.
Last modified: Sat Apr 12 18:29:25 CEST 2008