SyntaxFix
Write A Post
Hire A Developer
Questions
Another possible solution:
var c = $("#checkboxid"); if (c.is(":checked")) { $('#checkboxid').prop('checked', false); } else { $('#checkboxid').prop('checked', true); }