JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <h1>
        <a href="#">
            <span>Hello</span>
        </a>
    </h1>
</div>

JavaScript

$('*').on('click', function () {
   alert('Click event fired on the ' + this.nodeName + ' element'); 
});