JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">
    <p id="hello">HELLO</p>
    <p id="no-hello">NO HELLO</p>
</div>

JavaScript

$('#test').click(function() {
    if ($('#hello').is(':hover')) {
        alert('hello');
    }
});