how to make check if checked take value and if not checked take another value in php jquery code example
Example 1: How do I check whether a checkbox is checked in jQuery?
$('#' + id).is(":checked")
Example 2: check checkbox by jquery
$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);