JSFiddle - React, Tailwind, and code Playground

by nosfan1019

HTML

<div id="test"></div>

CSS

#test {
    width: 200px;
    height: 100px;
    background: green;
}

.active {
    background: red !important;
}

JavaScript

$("#test").hover(
  function () {
    $(this).addClass("active");
  },
  function () {
    $(this).removeClass("active");
  }
);