I am trying to use jQuery to change the background color of the body whenever a specific text (the letter “Y”) is found in a specific column.
The following only changes the background color of the table cell that it finds “Y” in.
$(document).ready(function () {
$("TD:nth-of-type(7):contains('Y')").css("background-color", "yellow");
});
I’ve tried it with body:background-color
but it doesn’t work.
Thanks!