I have a code that is working, but not totally with what I want, it is coloring only the selected cell, I want to color the entire line depending on the column's status.
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('#result_list tr td:nth-child(4)').each(function() {
if ($(this).text() == 'ARQUIVADO') {
$(this).css({
"background-color": 'yellow',
"color" : "#000000"
});
}
if ($(this).text() == 'TITULO EMITIDO') {
$(this).css({
"background-color": 'darkblue',
"color" : "#FFFFFF"
});
}
if ($(this).text() == 'PROCESSO LANÇADO') {
$(this).css({
"background-color": 'blue',
"color" : "white"
});
}
if ($(this).text() == 'TITULO ENTREGUE') {
$(this).css({
"background-color": 'green',
"color" : "white"
});
}
});
});
})(django.jQuery);
</script>
How do you color the entire line and not just the cell?