JSFiddle - React, Tailwind, and code Playground
by ajayogal
HTML
<div id="content">
<img src='pointer.png' id='pointer'>
<img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRLePxAFEqzukG-rd762vc80xOYHBs4PfPy951GGT6iICl8qHZc" id='car' />
</div>
CSS
#content{margin: auto; clear: both; width: 300px; height: 300px;}
.button1{cursor:pointer;}
#options{position: fixed; top: 0; right: 0;}
img{position:relative; }
img#pointer{position:absolute; z-index:90; height:50px;}
JavaScript
$(document.body).on('mousemove',function(e){
$('img#pointer').offset({left:e.pageX-20,top:e.pageY-20});
});
$(document.body).on('click',function(e){
$('img#car').offset({left:e.pageX-100,top:e.pageY-100});
});