JSFiddle - React, Tailwind, and code Playground

by fuggfuggfugg

HTML

<div class="overlay">
    
</div>


<div class="child child1">
    <button class="click"> click me</button>
</div>


<div class="child child2">
    <button class="click"> click me</button>
</div>

CSS

.overlay{
    position: absolute;
    pointer-events: none;
    background: rgba(0,0,0,0.25);
    top: 0;
    bottom: 0;
    left: 0;
    right: 80%;
    z-index: 10;
}

.overlay:after{
    content: "OVERLAY";
    background: red;    
}

.child{
    width: 100px;
    background: orange;
    border: solid 1px;
    text-align: center;
    margin: 30px;
}

.child2{
    position: absolute;
    left: 100px;
}

JavaScript

$(".click").on("click", function(){
alert("Can click");
});