JSFiddle - React, Tailwind, and code Playground
HTML
<div id="selector">
<span>Hello World</span>
</div>
JavaScript
$(document).ready(function(){
$('div').on('remove',function(){
alert(" first object object deleted");
});
setTimeout(function(){
$('#selector').remove();
},3000);
})