Check Uncheck Checkbox using JQuery

In this tutorial we will see how to Check Uncheck Checkbox using JQuery. Jquery method .prop() is used for this purpose.


HTML Code is given below.

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Check Uncheck Checkbox using JQuery</title>
<script src=""></script>
<button type="button" onclick='check()'>Check Checkbox</button>
<button type="button" onclick='uncheck()'>Uncheck Checkbox</button>
<input type="checkbox"> 

JQuery Code

JQuery Code is given below, In this code we have used .prop() method to check and uncheck the checkbox element.

function check(){          
$('input[type="checkbox"]').prop("checked", true);
function uncheck(){          
$('input[type="checkbox"]').prop("checked", false);

Video Tutorial

Watch video tutorial on how to Check Uncheck Checkbox using JQuery.