JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
</head>
<body>
<div id="moverdiv"></div>
</body>
</html>

CSS

#moverdiv{
  position: absolute;
  top: 0px;
  left: 0px;
  background-color: #000;
  width: 100px;
  height: 100px;
  
}

JavaScript

$(document).ready(function(){
  $(document).click(function(e){ 
    var mouseX = e.pageX;
    var mouseY = e.pageY;
    $("#moverdiv").css({'top':mouseY,'left':mouseX});
  }); 
});