Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text blinking jQuery

What is an easy way to make text blinking in jQuery and a way to stop it? Must work for IE, FF and Chrome. Thanks

like image 300
HP. Avatar asked Oct 22 '09 08:10

HP.


People also ask

How to make a text blink using jQuery?

Blink text using jQuery. JavaScript Code : function blink_text() { $('. blink').

How to make a div blink in jQuery?

"hidden" : "visible"; $("#blinkMe"). css("visibility", vis); }, 500); Note: used "visibility" and not "display" / . toggle() since the latter will cause layout to shift around while the div is blinking.

How do I make text flash in JavaScript?

To create a blinking text, use the JavaScript blink() method. This method causes a string to blink as if it were in a BLINK tag. Note − HTML <blink> tag deprecated and is not expected to work in every browser.

How do you blink text in HTML w3schools?

The HTML <blink> tag is used to create a blinking text that flashes slowly.


1 Answers

A plugin to blink some text sounds a bit like overkill to me...

Try this...

$('.blink').each(function() {     var elem = $(this);     setInterval(function() {         if (elem.css('visibility') == 'hidden') {             elem.css('visibility', 'visible');         } else {             elem.css('visibility', 'hidden');         }         }, 500); }); 
like image 189
alex Avatar answered Oct 12 '22 17:10

alex