JSFiddle - React, Tailwind, and code Playground
HTML
<table id="table">
<tr><td>Row 1</td><td class='remove'>Row 2</td></tr>
</table>
<input type="button" id="button" value="add">
CSS
table, td {
border: 1px solid grey;
}
.remove{
cursor: pointer;
}
JavaScript
$("#button").click(function(){
$("#table").append("<tr><td>Added</td><td class='remove'>Remove</td></tr>");
});
$(".remove").click(function(){
alert("Removed!");
});