JSFiddle - React, Tailwind, and code Playground

by luka kupunia

HTML

<div id="content"></div>

CSS

body {
  margin: 0;
}
#content {
  width: 500px;
  height: 500px;
  background: grey;
}

JavaScript

var timeout;
document.querySelector('#content').addEventListener('mousemove', function(){
  clearTimeout(timeout);
  timeout = setTimeout(function(){
		console.log('stoped')
	}, 50);
})