JSFiddle - React, Tailwind, and code Playground

by Sibeesh Venu

HTML

<div id="filterBox">
<input type="checkbox" value="categorya" id="one" />
<label for="one">One </label>

<input type="checkbox" value="categorya" id="two" />
<label for="two">Two </label>

<input type="checkbox" value="categorya" id="three" />
<label for="three">Three </label>
</div>

JavaScript

$(document).ready(function(){
  $('input[type="checkbox"]').click(function(){
    if ($('#one').is(":checked")) {
        console.log("testing");
    }
  });
});