Friday, April 01, 2005

Blinking Text on Internet Explorer?

Up until now, the <blink> tag was only available on Netscape and its close cousins. NO MORE! For all you IE users out there who are feeling disenfranchized, I have found the answer!!!

Just put this text in your document’s header and, Voila! you have the blink tag!

<style type="text/css">
<!--
* blink
{
visibility: expression((Math.floor(new Date().getTime()
/500)%2)?"visible":"hidden");
}
/* Code has been formatted to fit your screen.
You may delete the line break and extra space
in the CSS expression with no change in function. */
-->
</style>
<script type="text/javascript">
<!--
setInterval("document.recalc()",1);
-->
</script>

This, as you can plainly see, really works! I know, the date says April first. But trust me: this is all the code I used.

8 comments:

Prajwala said...

This is soo cool. Really great job. This is really what I want.

Unknown said...

Thanks buddy ur awsme.
code works
By Ambika

larshemel said...

Hello, The code is nice indeed but there is a much nicer and memory less intensive solution than expressions.

You can use a few lines of simple javascript code that makes text blink in all browsers. See http://www.larshemel.com/forum/blinking_text_in_ie for more information.

Cheers Lars

Brian said...

You’re missing the point. Internet Explorer is the only browser that doesn’t support the tag, and since IE lets you use arbitrary tag names, this is a neat and tidy way of turning the tag on for it. Besides, my solution is synchronized for all blink tags in the document, whereas yours is not for especially large pages. The further flaw is that you have used classes, which you must write a special function to find them. My solution is much simpler in that it employs tools already available to the target browser, in fewer lines of code.

Bk said...

awsm !!
it works.

thnx Brian.

Anonymous said...

I just read this. I mainly use firefox. The Blinking NO MORE! works in firefox, but noit in IE. I have both open right now to test this.

Brian said...

Apparently, the "expression" syntax, which worked on previous versions of IE, does not work on IE 9. But don't worry; the "text-decoration: blink" syntax ought to be coming to IE 10.

Anonymous said...

Great Job...Keep it up...Thank you..