JSFiddle - React, Tailwind, and code Playground

by Taras Romanyk

HTML

<input type="checkbox" id="check" >check it</input>

JavaScript

$("#check").change( function(){
   if( $(this).is(':checked') ) {
        alert("checked");
    }else{
        alert("unchecked");
   }
});