I\'m having trouble figuring this out. I have two checkboxes (in the future will have more):
checkSurfaceEnvironment-1
checkSurface
An alternative way:
Here is a working example and here is the code, you should also use prop.
$('input[type="checkbox"]').mouseenter(function() {
if ($(this).is(':checked')) {
//$(this).prop('checked',false);
alert("is checked");
} else {
//$(this).prop('checked',true);
alert("not checked");
}
});
I commented out the way to toggle the checked attribute.