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
Blink text using jQuery. JavaScript Code : function blink_text() { $('. blink').
"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.
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.
The HTML <blink> tag is used to create a blinking text that flashes slowly.
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); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With