JSFiddle - React, Tailwind, and code Playground

by anthony salamin

HTML

<input type="checkbox" />

JavaScript

$("input:checkbox[class=outsider]").on('click', function() {
  $(this).val(this.checked ? 1 : 0);
  alert($(this).val());
});