JSFiddle - React, Tailwind, and code Playground
by Paulpro
HTML
<div id="test">CLICK</div>
JavaScript
document.onclick = function(e){
e = e || window.event;
if(e.target.id == 'test')
alert('OK');
}
by Paulpro
<div id="test">CLICK</div>
document.onclick = function(e){
e = e || window.event;
if(e.target.id == 'test')
alert('OK');
}