change checkbox jq code example
Example 1: how to change checkbox state in jquery
$('[name="SelectedGroup"]').prop('checked', true);
Example 2: change checkbox jquery alert
$(document).ready(function() {
//set initial state.
$('#textbox1').val(this.checked);
$('#checkbox1').change(function() {
if(this.checked) {
var returnVal = confirm("Are you sure?");
$(this).prop("checked", returnVal);
}
$('#textbox1').val(this.checked);
});
});