JSFiddle - React, Tailwind, and code Playground

by Bharathi Raja

HTML

<div id="selector">
    <span>Hello World</span>
</div>

CSS

#selector{
    width:100px;
    height:100px;
    border:1px solid #CCC;
}

JavaScript

$(document).ready(function(){
    $(document).on('remove','div',function(){
        alert(" first object object deleted");
    });      
    setTimeout(function(){
        $('#selector').trigger('remove').remove();       
    },3000);
})