JSFiddle - React, Tailwind, and code Playground
HTML
<div id=A style="width: 100px; height: 100px; background-color: yellow;">
<div id=B style="width:100px; height: 50px; background-color: blue;">A</div>
B</div>
JavaScript
$('#A')
.on('mouseenter', function(){ $(this).css('background-color', 'orange'); })
.on('mouseleave', function(){ $(this).css('background-color', 'yellow'); })