JSFiddle - React, Tailwind, and code Playground

HTML

<div class="close">
  Click here
</div>

JavaScript

$(document).on('click', '.close', function() {
  alert('hello');
});