How to uncheck all checkboxes except those where value is 4 or 5 using jQuery?
//My code which is working for value is equal to 4
onchange="$('#cf_1682897_div input[type=checkbox]:checked').each(function(){if($(this).val() == 4 || $(this).val() == 5){$('#cf_1682897_div input[type=checkbox][value!=4]').prop('checked', false);alert('Selecting N/A in combination with any other options is not permitted. All other checked options are unchecked.');}})"
Aucun commentaire:
Enregistrer un commentaire