JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<input type="checkbox" id="2" /> <br />
<input type="checkbox" id="1" /><br />
<div></div>

JavaScript

$('input[type=checkbox]').click(function () {
    var value = $(this).attr('id');
    $('div').html(value + ' was selected!');
    $('input[type=checkbox]').prop('checked', false);
})