JSFiddle - React, Tailwind, and code Playground
HTML
<div id="main">Click<div>
<div id="chld">
asa<br/>sad
sda sad sd
<br/>
asasd sdj sad
<br/>
<div>
CSS
#chld{
background: blue;
color:white;
}
.bgcolorRed
{
background: red !important;
}
.redBG
{
}
JavaScript
$("#main").on('click',function(){
$("#chld").addClass("bgcolorRed").trigger("cssFontSet");
});
$('#chld').on('cssFontSet', function() {
alert("Red bg set ");
});