JSFiddle - React, Tailwind, and code Playground

by alexandershustik

HTML

<label class="target" for="check">
  <span>Я просто текст</span>

 
</label>
  <input type="checkbox" name="check" value="А я чекбокс, я дублирую клик">

JavaScript

jQuery(".target").on("click", function(){
  alert(1);
});
jQuery("input[name='check']").on("click", function(){
  alert(2);
});