0
I need to make the table row change to a certain color based on the value contained within the tag 'td'. All functions that I have found so far have not been useful to me as I have tried to implement in my code and have not succeeded.
<tr>
<td id="IDbatchID">010203</td>
<td id="IDproduct">Leite</td>
<td id="IDbatchSize">30000</td>
<td id="IDpriority">1</td>
<td id="IDstartReq">03-31-2017 08:00:00</td>
Based on the value within this 'td' I need it to change the color of 'tr'. For example, as here is 'Completed', I need the whole line to be green.
<td id="IDstatus">Completed</td>
</tr>
I do not know if I could be clear in my doubt. I ask for help, because everything I have found so far has not served me.
Not clear enough. As this value is loaded in td?
– user60252
@Leocaracciolo at the moment they are entered manually by me, because I still do not have the bank to make the connection, but the values will always be these: (Completed, Delayed, In Process, New).
– Matheus Alves de Oliveira
Uai and pq do not change the color of tr manually by changing the content of td?
– user60252
@Leocaracciolo why soon these data will be imported from the database automatically and I need to create a function able to color the line according to the value that will be imported.
– Matheus Alves de Oliveira
I get it, I’m studying a solution here
– user60252
Since you are new to the site, please read this post https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252
Here is not forum to keep putting solved in titles. This is unnecessary, simply check which answer solved your problem
– UzumakiArtanis