JSFiddle - React, Tailwind, and code Playground

by jashwant

HTML

<p id='layer'>This is layer</p>
<p id='other'>This is other part </p>
<p> this is someother layer</p>

JavaScript

$('body').click(function(e) {
    if (e.target.id !== 'layer') {
        alert('Put code to hide layer here');
    }

});