View Full Version : Fading Links

09-29-2003, 08:43 PM
How can you make links slowly fade into their color?

Here's an example:

Just hover over a link and it changes color slowly, so can you tell me how to do it?

Roy Sinclair
09-29-2003, 09:57 PM
Probably using the proprietary filter CSS MS added to IE since a quick look at the html shows the links all have a class named "fade" declared.

Go to the MS web site and search with "Filter CSS HTML" as your keywords and you should get some results.

09-29-2003, 10:10 PM
Sorry, Roy, it's standard spaghetti DHTML stuff, located in their "head.js" file.

Some of the more painful bits include

document.onmouseover = domouseover;
function domouseover() {
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
if (!document.all)

- and that's just some of the low-lights.

Blatch, if you have any aptitude for scripting, you should be able to come up with a solution much nicer than this. Hell, I might give it a shot tonight if I'm not busy.

09-30-2003, 03:48 AM
Google Search "Link Fader (http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=link+fader)"

09-30-2003, 03:52 AM
Roy, your script was the fourth hit. Very cool. :D