JSFiddle - React, Tailwind, and code Playground

by TheJoeFletch

HTML

<div id="my_div">Click me</div

JavaScript

function thisId (element) {
    alert( $(element).attr("id") )
}

$("#my_div").on("click", function () {
    thisId(this);
});