JSFiddle - React, Tailwind, and code Playground

by Web Carvers

HTML

<button id="one" class="delete"type="button">Id on me</button>
<div id="one">This is the div to remove</div>

JavaScript

$("button.delete").on('click', function(){
   var id = $(this).attr("id");
    $("div#"+id).remove();
});