![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using XPath to select certain cells from a table that match some criteria. From there, I am applying styles to the entire row using 'item.parentNode.style'. What I want to do is style the text color for the entire row. Well, of course 'item.parentNode.style.color = 'red'' on the table row doesn't work. I know with css a contextual selector of 'table tr td {style:red;}' would work. However, I don't know how to accomplish something similar in javascript. Is there no other way to do it than looping over 'item.parentNode' and applying styles to each child (table cell)? And if this is the only way, how could I reference the children of 'item.parentNode'? Appreciated, |
![]() |
| Thread Tools | |
| Display Modes | |
| |