1
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 whole line depending on the status of the column.. follows the code:
<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 only the cell ?
You also cannot change the question by adding another one when you already have answers. In case you would have to ask another question, but I already put in the comment there a solution.
– Sam