JSFiddle - React, Tailwind, and code Playground
by akshatha suchethan
HTML
<input type="checkbox" class="hi" id="c1"><a href="#">terms and conditions</a>
<button type="submit" id="p1" class="bye" value="submit" disabled="disabled"></button>
<br/>
<input type="checkbox" class="hi" id="c2"><a href="#">terms and conditions</a>
<button type="submit" class="bye" id="p2" value="submit" disabled="disabled"></button>
JavaScript
$('#c1').click(function(){
$('#p1,').removeAttr('disabled');
if($(this).attr('checked') == false){
$('n1').attr("disabled","disabled");
}
else {
$('#n1').removeAttr('disabled');
}
});