...

View Full Version : Fading Links



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

Here's an example:
http://www.universalpalace.net/Sy/?asd=home

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.

Choopernickel
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() {
if(document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(startColor,endColor,srcElement.uniqueID,stepIn);
}
}
...
if (!document.all)
return

- 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.

RoyW
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)"

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum