Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<blink> tag in Internet Explorer

Neither the <blink> tag nor the text-decoration:blink; style in css are supported in Internet Explorer.

Is there any technique available for making blinking text in IE?

like image 244
Piyush Avatar asked May 28 '10 10:05

Piyush


2 Answers

Avoid blinking, if possible - it annoys people.

But you can do it with JS/jQuery like this:

setInterval(jQuery('.blinking').toggle, 1500 );

That'll show/hide anything with the blinking class every 1.5 seconds.

So in the HTML you would do:

<span class="blinking">hello!</span>  

But again, think very carefully about whether it should be blinking!

If you need something to specifically draw a user's attention (and for whatever reason regular emphasis/highlighting/etc isn't good enough), then instead of on-off blinking (where the text dissappears for half the time), consider changing the colour, or a blinking underline/border, or similar.

The key thing is, if something is important enough to visually annoy the user then it should remain readable.

like image 89
Peter Boughton Avatar answered Sep 22 '22 20:09

Peter Boughton


You can use this code:

$(document).ready(function () {
    setInterval("$('.blink').fadeOut().fadeIn();",1500);
});

and a class link this

<div class="blink">BLING BLING...</div>  

see working demo http://jsfiddle.net/SGrmM/


You can also use this code:

$(document).ready(function () {
    setInterval("$('.blink').fadeOut(150).fadeIn(150);",1000);
});

see working demo http://jsfiddle.net/SGrmM/1/


see booth examples in the same fiddle http://jsfiddle.net/SGrmM/2/

like image 40
bernte Avatar answered Sep 25 '22 20:09

bernte