JSFiddle - React, Tailwind, and code Playground

HTML

<label>
    <input type="checkbox" name="is_saturday" value="true" />
    Is it saturday?
</label>

JavaScript

function checkIfCheckboxIsChecked(e) {
    if ($('[name=is_saturday]').attr('checked')) {
        alert('attr works fine!');
    }
    if ($('[name=is_saturday]').is(':checked')) {
        alert('is works fine!');
    }
}

$('[name=is_saturday]').change(checkIfCheckboxIsChecked);