JSFiddle - React, Tailwind, and code Playground
HTML
<div class="div-input">
This is clearly some text.
</div>
CSS
.div-input{
color: red;
width: 200px;
}
.div-input-second{
color: blue;
width: 300px;
}
div{
background-color: #cccccc;
}
JavaScript
$(".div-input").click(function () {
$(".div-input").switchClass("div-input", "div-input-second", 1800);
$(".div-input-second").switchClass("div-input-second", "div-input", 1800);
});