JSFiddle - React, Tailwind, and code Playground

by Fiddel

HTML

<input type="checkbox" id="checky"><a href="#">terms and conditions</a>
<input type="submit" id="postme" value="submit" disabled>

JavaScript

$('#checky').click(function(){
     
    if($(this).attr('checked') == false){
         $('#postme').attr("disabled","disabled");   
    }
    else {
        $('#postme').removeAttr('disabled');
    }
});