JSFiddle - React, Tailwind, and code Playground

by Michael Mandarino

HTML

<div class="spacer">

</div>
<div class="clickme">
Click me
</div>
<div class="info">

</div>

CSS

.spacer {
	background: blue;
	height: 500vh;
	width: 100%;
}
.clickme{
	background: orange;
	width: 100%;
cursor: pointer;
height: 500px;
}

.info {
	height: 1000px;
}

JavaScript

function ZoomIn(event) {

  x = event.clientX;
  y = event.clientY;
  $('.info').append('x:' + x + ' ');
  $('.info').append('y:' + y + ' ');
}


$(".clickme").on("click tap", function(event) {
  ZoomIn(event);
})