ZaZaKi, a web developer Between Manchester UK & Rotterdam NL. © 2015-2024.

jquery Tick box to enable a button

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){ 
$('#checkbox').click(function(){
   if (this.checked) {
	   $('#button').prop('disabled', false);        
   }else{
	$('#button').prop('disabled', true);        
   }
}); 
});
</script>
<title></title>
</head>
<body>
Check this box to enable the button<br>
<form>
	<input id="checkbox" type="checkbox"><br>
	<button disabled id="button">button</button> 
</form>
</body>
</html>
Categroy:
Front-end , JQuery