JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" />
<input type="radio" /> <span id="test">Click here</span>

JavaScript

//$(":checkbox").enCheckBox();
$("#test").click(function () {
    if ($(":checkbox").attr("checked") == undefined) {
        $(":checkbox").attr("checked", "checked")
    } else {
        $(":checkbox").removeAttr("checked")
    }
});