JSFiddle - React, Tailwind, and code Playground
by kouty79
HTML
<div class="a b">
A B
</div>
<div class="a">
A
</div>
<div class="b">
B
</div>
CSS
.a {
font-weight: bold;
}
JavaScript
const elements = document.querySelectorAll('.a')
setTimeout(()=>{
for(let el of elements) {
console.log(el.className);
el.style['font-weight'] = 'normal';
}
}, 2000);