I am trying to disable other checkboxes on selection of one checkbox and enable again if this has again been de-selected.
Below is a snippet of code I found that worked during an example fiddle for a standard checkbox but I have not been able to replicate this for a checkboxfor, can someone please recommend the changes I need to make in order for this to work in a checkboxfor?
<script>
$('#chkItems').change(function () {
$(this).siblings('#chkItems').prop('disabled', this.checked)
});
</script>
And below is my checkboxfor where I am calling this
@Html.CheckBoxFor(modelItem => item.IsDisplayImage, new { id = "chkItems" })