JSFiddle - React, Tailwind, and code Playground

by Akram kamal

HTML

<input type="checkbox" />
<div id="results"></div>

JavaScript

$('input').change(function () {
    $('#results').html("attr=" + $(this).attr('checked') 
        + "<br />" + ":checked=" + $(this).is(':checked')
        + "<br />" + "prop(checked)=" + $(this).prop('checked')
        + "<br />" + "this.checked=" + this.checked); 
});