JSFiddle - React, Tailwind, and code Playground

HTML

(timer adding more blocks is just to show that there is no need for .live with this technique)

<div class="popupstyle">Woah!</div>

CSS

.popupstyle{
    margin:10px auto;
    padding:10px;
    background:SlateGray ;
    color:white;
    font-weight:bold;
    width:400px;
    text-align:center;
    outline:skyblue 1px dashed;
    box-shadow:0 3px 2px rgba(0,0,0,0.1);
}

JavaScript

$(window).click(function(e){
       if( ! $(e.target).hasClass('popupstyle') ){ $('.popupstyle').hide(); } 
});

setInterval(function(){
    $('body').append( $('.popupstyle').eq(0).clone() );
}, 5000);