var checkForInstance = function (myCheckbox,myInstance) { if (jQuery('#'.myCheckbox).is(":checked") && jQuery('#'+myCheckbox).val() == jQuery('#'+myInstance).val() ) { jQuery('#'.myCheckbox).attr('checked',false); } }
this function checks if your checkbox value matches a different value for the elements and cancels it if checked.
source share