JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<div>Parent<div>Child</div></div>
CSS
div { margin: 50px; border: solid 1px red; }
.hovered { background-color: blue; }
JavaScript
$("div").mouseover(function(e) {
$(this).addClass("hovered").parents().removeClass("hovered");
e.stopPropagation();
}).mouseout(function() {
$(this).removeClass("hovered");
});