This script will gradually fade the text for any link you choose from one color to another. Just set a number of parameters in the link HTML tag and the script will do the rest. Simply omit the parameters for links which you want to keep the default look.
This effect only works in IE5+, Netscape6+, and Mozilla 1+, but does not cause errors in older browsers.
Installation:
The parameters that you have to set in the <A> HTML tag are just a set four values seperated by a "~" sign. Spaces between the values and the "~" sign are ok if it helps readability, but they aren't needed.
Once you create your tags and parameters correctly, the script will automatically search for <A> tags with your parameters in them.
Notes & Advanced Options:
The script also supports this effect for other elements along with/instead of just an <A> tag. This is done by adding the parameters attribute to the inside of the element and then instructing the script to look for those elements too.
Example using a <SPAN> tag:
Create the element and add the parameters like so:
At the very bottom of your HTML page, (under the the script tag that loads the "linkfader.js" file, but before the </BODY> tag) insert a command between script tags to have the linkfader script search for the other elements like so:
Now the script will also search for <SPAN> elements that have the "parameters" attribute set. See the working product below. Other style attributes were added to make the example clearer, but is not necessary
SPAN TAG
Note: you don't have to add the extra script to search for the <A> tag because the script does this automatically. These extra steps are just needed for other element types. Incidentally, many elements can be used this way: table cells, DIV tags, etc.
Some people somewhat familiar with javascript may notice that the script functions on the onmouseover, and onmouseout events. Hmmm, it looks like you can't set handlers for these events now, right? Wrong! :) You can still set these handlers in the tag and everything will still work fine
Below is some example code which changes the statusbar text using mouse events to demonstrate: