JSFiddle - React, Tailwind, and code Playground
HTML
<p>Click button to change b style class from DIV. background-color will change from black to blue (hopefully)</p>
<button onclick="myFunction()">Try it</button>
<div id="myDIV" class="my1bla">
I am a DIV element
</div>
CSS
.my1bla {
background-color: black;
}
.mybla {
background-color: blue;
}
JavaScript
function myFunction() {
var x = document.getElementById("myDIV");
x.classList.value = x.classList.value.replace("1", "");
}