JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" class="social" value="test" />
<div id="social" class="overlay">
    <div class="inner"> 
        <a class="close" href="#">
            <span class="icon-close">X</span>
        </a>
        CONTENT
    </div>
</div>

CSS

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}
#social .inner {
    margin: 0 auto;
    z-index: 1000;
    width: 380px;
}

JavaScript

$(document).ready(function () {

     $("#social").css("height", $(document).height());

     $(".social").click(function () {
         $("#social").fadeIn();
         return false;
     });

     $(".close").click(function () {
         $("#social").fadeOut();
         return false;
     });

     $("#social").on('click', function () {
         $(this).fadeOut();
     });
 });