V
V
Vitaly Rybchenko2015-11-12 11:41:29
JavaScript
Vitaly Rybchenko, 2015-11-12 11:41:29

How to highlight a row in a table depending on the value in the cell?

Actually the question is - if the table has a bunch of rows (each row does not have an id or some kind of individual indicator), there are a bunch of cells in the row, but one of them can have one of 4 values ​​\u200b\u200b(let's say 1,2,3 and 4 ). How to highlight the entire row with a color if the value in this cell is 2?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri, 2015-11-12
@biovr

I didn’t have time a little)
You can do this plnkr.co/edit/DN0TbQ?p=preview
Unlike Maxim’s solution, the background is painted on the cells themselves, and not on the tr element

V
Viktor, 2015-11-12
@master2016

take the parent of this td and paint all its children with a background.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question