JSFiddle - React, Tailwind, and code Playground

by Qwerty_Wasd

HTML

<div class="window_relative" id="window_relative">
   <div class="new_window">
    <img src="img/cross.png" alt="cross">
   </div>
</div>

CSS

.window_relative {
    position: fixed;
    z-index: 2;
    width: 100%;
    height: 100%; 
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
	 display:none;
    }

JavaScript

$(document).ready(function() {
  $('.block_1').click(function() {
    $('.block_mobile').fadeTo('normal', 0);
  });
 
  $('img[alt="cross"]').click(function() {
    $('#window_relative').animate({height: 'hide'}, 350);
  });
});