I’m new to Jquery and would really appreciate any help.
My table has many rows with some as Error:
<td>
Error:
<input name="[0].ValidationResult" type="hidden" value="Error:" />
</td>
<td>
<input data-val="true" data-val-required="The isChecked field is required." name="[0].isChecked" type="checkbox" value="true" /><input name="[0].isChecked" type="hidden" value="false" />
</td>
I would like to figure out to disable the checkboxes in the same row as the Error:
Thanks for your help.
This logic be done on the server, but if for some reason you need to do it with javascript:
As pointed out in the comments section if you are using jQuery 1.6+ the
.prop()method should be used instead of.attr: