Das BlinkenTechts!

January 9, 2007

I was kicking around the WebDeveloper forums this morning and found a little project to keep me busy. A user was looking for a simple way to blink the colors of some text. I wrote up a flexible little class in JavaScript to handle it.

Really simple to implement, and kind of a minimalist class. Just include the file, add name attributes to the ones you want to blink and set up the window.onload. Here’s an example of the onload:

window.onload = function () {
  var bT = new blinkenTechts(new Array("#000","#F00","#00F"), 'targetName', 500);

With that configuration every element with the name targetName would rotate through the colors black, red, and blue on a half-second interval once bT.blink(1) was called.

For more example peek at the source of these little example blinkenTechts. You can download the source here.

Ze blinkin techts!
Das ist mas blinkin techts!
Ze blinkin techts!
Das ist mas blinkin techts!

Categories: Geek
Tags: , ,

Leave A Comment

Your email will not be published.