JSFiddle - React, Tailwind, and code Playground

by mehulkar

HTML

<form>
  <input type="checkbox"></input>
  <input type="checkbox"></input>
  <input type="checkbox"></input>
</form>

JavaScript

$('form :checkbox').on('click', function () {

  if ($(this).is(':checked')) {
    alert('a checkbox was checked');
  }
});