best viewed with TrebuchetMS & AndaleMono

About Me

Special Effects: JavaScript Text Fader

I was looking for a bit of JavaScript that would fade the text in the description part of the page header of this blog from a light gray to a dark gray, so that it would show up against the background. I came across Premshree Pillai's Text Fader JavaScript that fades text from a start color to an end color and it worked as promised. I decided to use it for the post dates as well.

The original script generates an HTML font element (deprecated), and since we're using XHTML around here, I modified it to generate inline CSS instead. I removed the options altogether for font face, size, weight, and variation as these can be taken care of via style rules in the page's style sheet. All that's needed is the text to be written and the start and end colors. I also added a noscript element that will allow the text to show up even if the viewer has JavaScript disabled.

Here is the modified script in all its glory... Read the full article

 

2 Comments:

Blogger bschneider5 said...

I like this post, maybe you can have more like it?!?! I'll add you to my blogroll.Bradsblog

3:12 PM  
Blogger traceLine said...

But of course!

Your blogroll is missing today. I added you to my traceLine blogroll.

8:08 PM  

Post a Comment

<< Home

To the Top