JSFiddle - React, Tailwind, and code Playground

by Anoop Sharma

HTML

<div id="ignore"> </div>

CSS

#ignore{ height: 100px; width: 100px; background-color: black; }

JavaScript

$(document).click(function(e) { 
   if( !$('#ignore').is( e.target ) )
      alert('clicked on document');  
});