JSFiddle - React, Tailwind, and code Playground
by Asim Shariff
HTML
<div id="test">
<button id="Test2">tessst</button>
</div>
JavaScript
$("button[id]").click(function(event) {
event.preventDefault();
var id_name = $(this).attr("id");
alert(id_name);
});