I am looking to enhance the appearance of my table by changing the font style of a checkbox label to bold when the checkbox is checked.
In my current setup, I have implemented code that toggles the visibility of all table rows based on a header checkbox. Now, I want to take it a step further and highlight the text in the adjacent cell when an individual row's checkbox is clicked.
$(document).ready(function() {
$('#HideValidationRows').change(function() {
if (!this.checked)
$('.AllValidationRows').fadeIn(100);
else
$('.AllValidationRows').fadeOut(100);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table 900px="" border="1" style="width: 900px; height: 63px;">
<tbody>
<tr style="height: 63px;">
<td style="height: 23px; background-color: #bdac73; width: 478px;" colspan="2"><span style="color: #000000;"> <strong> Verification, Validation & Qualification</strong></span></td>
<td style="width: 257px; background-color: #bdac73; text-align: center;"><input type="checkbox" id="HideValidationRows" /></td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input id="boldCheckbox" type="checkbox" class="boldCheckbox" /></td>
<td style="width: 695px; height: 17px;" colspan="2"> IQ/OQ/PQ</td>
</tr>
<tr style="height: 21px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 21px;" colspan="2"> Design Verification</td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 22px;" colspan="2"> Design Validation</td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 21px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 21px;" colspan="2"> Process Validation</td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 21px;" colspan="2"> Labels Verification</td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 21px;" colspan="2"> Non-Current DPD Authority & Derivative Dataset Archive</td>
</tr>
<tr style="height: 22px;" class="AllValidationRows">
<td style="width: 40px; vertical-align: top; height: 22px;" td=""> <input name="DV" type="checkbox" /></td>
<td style="width: 695px; height: 21px;" colspan="2"> First Article Inspection Report</td>
</tr>
</tbody>
</table>