JSFiddle - React, Tailwind, and code Playground
by Edward
HTML
<input id="check1" type="checkbox" checked="checked">
<label for="check1">Check me</label>
<p></p>
CSS
p { margin: 20px 0 0 }
b { color: blue; }
JavaScript
$("input").change(function() {
var $input = $(this);
$("p").html(".attr('checked'): <b>" + $input.attr('checked') + "</b><br>"
+ ($input.prop ?
".prop('checked'): <b>" + $input.prop('checked') + "</b><br>" : '')
+ ".is(':checked'): <b>" + $input.is(':checked') ) + "</b>";
}).change();