Check and Uncheck Checkbox with Jquery

We will examine how to check and uncheck a checkbox with jquery. Although this is so easy subject, some developers don’t know to Check and Uncheck Checkbox with Jquery. We will show you with samples.




You can check checkboxes with attr(‘checked’,’checked’)

[js]$(‘input[type="checkbox"]’).attr(‘checked’,’checked’);[/js]

You can uncheck checkboxes with removeAttr(“checked”)

[js]$(‘input[type="checkbox"]’).removeAttr("checked");[/js]