JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li id="a">
<p>In Chrome this text will turn red and stay red. Why?</p>
<span id="s">Blinking Text (not in Chrome)</span>
<hr/>
<p>Now, with this code, the attribute is removed and set again even in Chrome. (</p>
<span id="ss">Blinking Text</span>
</li>
</ul>
JavaScript
var t = true;
setInterval(function(){
t = !t;
if(t){
$('#s, #ss').css({color: 'rgb(255, 0, 0)'});
} else {
$('#s').removeAttr('style'); // << doesn't work in Chrome !!
// Workaround :
var elt = $('#ss').get(0); // retrieve the underlying DOM element
elt.setAttribute('style', '');
elt.removeAttribute('style');
}
}, 1000);