0
I am wanting to color an entire row of a table, if the respective column of that row has some text, there are three possible situations: 1. the text itself, 2. fields with a "-", 3. fields with nothing. The column referring to is 9, observation field, and tried as follows , without success:
(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);