Hi guys. I need to check if checkbox is not checked on page load and add class to its tr. my markup:
<table class="table table-user-information table-hover">
<tbody>
<tr>
<td> <label>SkyLights</label></td>
<td>
<asp:CheckBox ID="ChkSkyLights" runat="server" Enabled="false" />
</td>
</tr>
<tr>
<td> <label>Gutters</label></td>
<td>
<asp:CheckBox ID="ChkGutters" runat="server" Enabled="false" />
</td>
</tr>
</tbody>
</table>
Rendered looks like this:
<tr>
<td> <label>SkyLights</label></td>
<td>
<span disabled="disabled"><input id="ctl00_cphGlobalContent_FormView1_ChkSkyLights" type="checkbox" name="ctl00$cphGlobalContent$FormView1$ChkSkyLights" disabled="disabled"></span>
</td>
</tr>
My idea is to add class text-muted to the markup to each checkbox, but how can i remove it on page load? I have this jquery script but im not sure how to use it.
<script>
$(function(){
$('#.muted').closest('tr').removeclass('text-muted');
});
</script>
thanks.