JSFiddle - React, Tailwind, and code Playground

HTML

<div class="parent" style="width:500px; height:800px;">parent
<div class="child" style="width:250px; height:250px; margin:250px auto 0 auto;">
    child
</div>
</div>

CSS

.parent{
    border: 1px solid red;
}.child{
    border: 1px solid green;
}

JavaScript

$('.child').on('mouseenter','mouseout',function(){
    $(this).closest('.parent').toggle();
});