I'm wanting to coloris an entire row of a table, if its column in that row has some text, there are three possible situations: 1. the text itself, 2. fields with a "-", 3. fields with nothing. The reference column is a 9, field observation, and I tried the following unsuccessful way:
(function($) {
$(document).ready(function() {
$('#result_list tr:nth-child(9)').each(function() {
if ($(this).text() != '-') {
$(this).css({
"background-color": 'yellow',
"color" : "black"
});
}
if ($(this).text() != '') {
$(this).css({
"background-color": 'yellow',
"color" : "black"
});
}
});
});
})(django.jQuery);