S/N Name Result Action
--------------------------------------
1 Mike Passed
2 Mark Failed
3 Mary Failed
Based on the table above, I need to:
- Highlight result column in red where the result is Failed
- Provide a “Retry” hyperlink in action column for those have failed.
Something like $(‘table.td.result).. (I am not sure about the correct syntax).
You can use
:contains()for example:You can try it out here. The
:nth-child()part is so we’re only looking in the third column, and someone named “Little Bobby Failed” doesn’t cause a match in the second column by mistake.