JSFiddle - React, Tailwind, and code Playground

HTML

<div style="position:relative">
    <img id="sorc" src="~/photos/test.jpg" />
    <div id="test" class="cclass" style="border:solid">name:blahblah
        <br />name:blahblah
        <br />name:blahblah
        <br />
    </div>
</div>

CSS

.cclass {
    position:absolute;
    background-color:orange;
    height:125px;
    width:175px;
    top:0px;
    left:0px;
    display:none;
}
.hi {
    height:600px;
    width:500px;
    background:red;
}
}

JavaScript

$('#sorc').on('mousemove mouseleave',function (e) {


     if (e.type == 'mouseleave'){
     $('div#test').css('display', 'none');

     }                

     else {

     $('div#test').css({

           'display': 'block',
           'top': e.pageY,
           'left': e.pageX

           });
         }
});