JSFiddle - React, Tailwind, and code Playground

by vi161

HTML

<!DOCTYPE html>

            <div class="input-new">
                    
            </div>

CSS

.input-new{
    width: 200px;
    height: 200px;
    background: red;
}
.sub{
    margin-top:20px;
    border-radius:3px;
    width:120px;
    font-size:11px;
    padding:2px;
    color:grey;
}
.button-play{
    margin-top:40px;
    width:30px;
    height:20px;
    background-image: url('button-play.png');
    border:none;
}
.sub-left{
    display:inline-block;
    
}
.sub-right{
    display:inline-block;
    position:relative;
    top:5px;
}
}

JavaScript

$(document).click(function (e){
                        var clickElem = $(".input-new");
                        if (!clickElem.is(e.target)
                            && clickElem.has(e.target).length === 0) {
                            clickElem.hide()
                        }
                    });