Cut & Paste "Depressible" image links
JavaScript Kit
Description: This script will make any image link depressible. Note that you will need an alternate image to display when the image is depressed.
Directions: Step 1: Copy these two images onto your hd by "right clicking" them, and choosing "save as".
Step 2: Insert this into the <head> tags, changing the parts in red, if you're using your own images.
<script
language="javascript1.2"> <!-- img1=new Image() img1.src="up.gif" img2=new Image() img2.src="down.gif" //--> </script> |
Step 3: Finally, insert this into your <body> tags, changing the parts in red, if you wish.
<a href="whatever.htm" onMousedown="document.images['example'].src=img2.src" onMouseup="document.images['example'].src=img1.src"> <img src="up.gif" name="example" border=0></a> |
If you want multiple depressible images within one page, simply repeat steps 2 and 3 for each depressible image. When repeating step 3, be sure to change the part in blue ('example') to another unique name each time.