JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myDiv">
<p>Some text</p>
<input type="button" value="A button" />
</div>

<div id="overlay"></div>

CSS

#myDiv {
    width:100px;
    height:100px;
    background-color: yellow;
    margin: 50px 50px;
    padding:10px;
}

#overlay {
    display:none;
    position: absolute;    
    width:100px;
    height:100px;
    background-color: gray;
    top: 50px;
    left: 50px;
    padding: 10px;
    opacity: .8;
}

JavaScript

$(document).ready(function() {
    $("#myDiv").click(function() {
        $("#overlay").show();
    });
});