JSFiddle - React, Tailwind, and code Playground
by GopsAB
HTML
<div class="categoryId">100</div>
CSS
.categoryId
{
width:100px;
height: 100px;
border: 1px solid;
}
.x
{
background-color: red;
}
JavaScript
if ($(".categoryId").text() == "100") {
$(".categoryId").addClass("x");
}