JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">
<p id="Test">Test</p>
<p id="No Test">No Test</p>
</div>
JavaScript
$('#test').click(function() {
if ($('#Test').is(':hover')) {
alert('Test');
}
});
<div id="test">
<p id="Test">Test</p>
<p id="No Test">No Test</p>
</div>
$('#test').click(function() {
if ($('#Test').is(':hover')) {
alert('Test');
}
});