JSFiddle - React, Tailwind, and code Playground
by beradrian
HTML
<div id="test">Lorem <div id="inner">ipsum</div></div>
CSS
#test {
width:300px;
height: 200px;
background-color: lightgreen;
}
#inner {background-color: red;}
JavaScript
$("test").on("mouseenter", function() {
this.style.backgroundColor = "green";
});
$("test").on("mouseleave", function() {
this.style.backgroundColor = "lightgreen";
});