8

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?

Jessica Guerard
  • 386
  • 3
  • 16
Piyush
  • 5,145
  • 16
  • 49
  • 71

2 Answers2

14

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.

bjb568
  • 11,089
  • 11
  • 50
  • 71
Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
8

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/

bernte
  • 1,184
  • 2
  • 19
  • 34