JSFiddle - React, Tailwind, and code Playground

HTML

<div id="hook">
    <label>Click me 1</label>
    <label>Click me 2<input type="text"/></label>
</div>

CSS

label {
    display: block;
}
input {
    margin: 10px
}

JavaScript

console.log($('#hook label').length)

$('label').click(function(e) {
    if (e.target.tagName === "LABEL") {
    alert("!! here")
    }
});