JSFiddle - React, Tailwind, and code Playground
by akshatha suchethan
HTML
<input type="checkbox" name="checkboxG1" id="checkbox1" class="css-checkbox" />
<label for="checkboxG1" class="css-label"></label>
<button type="button"id="submitButton" class="btn btn-primary btn-black" disabled="disabled">Next</button>
JavaScript
$('#checkbox1').click(function() {
if ($(this).is(':checked')) {
$('#submitButton').attr("disabled", "true");
} else {
$('#submitButton').removeAttr("disabled");
}
});