JSFiddle - React, Tailwind, and code Playground
by Dipak1991
HTML
<div class="col-md-1">
<center>
<label>
<p>Recurring</p>
<input type="checkbox" id="task_recur" onclick="toggleRecur()"></input>
</label>
</center>
</div>
JavaScript
function toggleRecur() {
console.log("toggleRecur()");
}
$(document).on("change", "#task_recur", function () {
alert("delegated event");
});
$('input[id=task_recur]').change(function () {
if ($(this).is(':checked')) alert("change event");
});