JSFiddle - React, Tailwind, and code Playground

by Omar X

HTML

<div>
    <input type="button" id="blah" name="blah" data-inline="true" value="blah" />
</div>
<label for="test">Disabled
    <input type="checkbox" name="test" id="foo" disabled/>
</label>

JavaScript

$('#blah').on('click', function () {
    if($('#foo').prop('disabled')) {
    $('#foo').prop('disabled', false).checkboxradio('refresh').prev('label').find('.ui-btn-text').text('Enabled');
    }
    else {
        $('#foo').prop('disabled', true).checkboxradio('refresh').prev('label').find('.ui-btn-text').text('Disabled');
    }
});