JSFiddle - React, Tailwind, and code Playground

by Stephen

HTML

<div>
    <label for="box1">Box 1</label>
    <input type="checkbox" id="box1" name="BoxOne" />
    <span>Checked:</span>
    <span id='box1state'>?</span>
</div>

JavaScript

$('document').ready(function () {

    var box1state = $('#box1state');

    $('#box1').change(function (e) {
        box1state.text(this.checked);
    });

    box1state.text($('#box1')[0].checked);
});