JSFiddle - React, Tailwind, and code Playground
HTML
<img id="image" src="http://images.pictureshunt.com/pics/m/mouse-8557.JPG"/>
<div id="plz">
</div>
CSS
#image{
position:absolute;
width:340px;
height:200px;
}
#plz
{
width:500px;
height:350px;
border:1px solid red;
}
JavaScript
$(document).ready(function() {
$("#plz").hover(function(){
$("#image").show(); //Show tooltip
}, function() {
$("#image").hide(); //Hide tooltip
})
$('#plz').mousemove(function(e){
$("#image").css({left:e.pageX-120, top:e.pageY-80});
});
});