JSFiddle - React, Tailwind, and code Playground
HTML
<h1 class="title">Title</h1>
<h2 class="helper">Helper 1</h2>
<h2 class="helper">Helper 2</h2>
CSS
html, body {
height: 100%;
}
body {
background: red;
}
h1, h2 {
margin-bottom: 1em;
background: white;
}
JavaScript
$("body").mousedown(function() {
if ( $(".title").is(":hover") || $(".helper:hover").length ) return;
alert( 'triggered' );
});