I have an event listener that listens to a series of checkboxes, I am able to add a property when the box is checked, but when the box is unchecked I am not able to remove the property. what can be done to make it work properly?
so when i use this: $(this).val(':checked'); then I get this
How do I remove the value=":checked" ?
<script>
$('.programs').click(function () {
if ($(this).val(':checked') == "checked") {
$(this).prop('checked', false);
} else {
$(this).val(':checked');
}
});
</script>