JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test-element">Click me</div>

JavaScript

$(document).on('click','#test-element',function(){
    alert("You clicked the element with and ID of 'test-element'");
});