JSFiddle - React, Tailwind, and code Playground

by rohanbhangui

HTML

<input class="foo" type="checkbox" name="vehicle" value="Bike">I have a bike<br>

JavaScript

$(".foo").on("change", function() {
  $input = $(this);
  alert($input.prop("checked"));
});