JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <span>Checkbox Test:</span>
    <input type="checkbox" name="checkbox_test" id="id_checkbox_test"/>
</div>

JavaScript

$( "#id_checkbox_test" ).on( "click", function( event ) {
    //jQuery method
    alert($(this).val());
    
    //it can work with javascript method
    //alert(this.checked);
});