JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
<div id="r"></div>
CSS
body {
font: normal 14px/140% sans-serif;
}
#test {
border:solid 1px black;
height:200px;
width:200px;
}
JavaScript
var lastEvent = null,
countEvent = 0;
$("#test").bind("blur focus focusin focusout load resize scroll unload click" + " dblclick mousedown mouseup mousemove mouseover mouseout mouseenter " + "mouseleave change select submit keydown keypress keyup error", function (e) {
if (lastEvent !== e.type) {
countEvent++;
$("#r").prepend("<span>" + countEvent + ": " + e.type + "<br></span>");
$("#r > span:nth-child(21)").remove();
lastEvent = e.type;
}
});