asked on November 20, 2023
•
Show version history
Hello all. I am trying to get my form to change the color of either the row or the fonts in the row when the check box in the 'Use' column is checked.
Currently, I was able to get the font to change color when a value in the Column Brand name is changed to Archwire. In the end though, I need the check box 'Use' to be the trigger, not the dropdown under Brand name. Can someone help me with how to refence a check box being checked?
CSS
tr.RedRow {color:#f00;}
tr.RedRow input, tr.RedRow select {color:#f00;}
$(document).ready( function() {
$('.MyTable').on('change','.ColorSelect select', function() {
if ($(this).val() == "Archwire"){
$(this).closest("tr").addClass("RedRow");
}else{
$(this).closest("tr").removeClass("RedRow");
}
});
});
0
0