I want the entire table row to change color (background color or text color) based on the value of the column labeled Status. If the value in the Status column is Expired, the background of the entire row should change.
(Edit: data will be dynamically pulled from the database).
Any suggestions?
HTML code
<table>
<th>Bonus Competitions</th>
<th>Value</th>
<th>Link</th>
<th>Expires</th>
<th>Status</th>
<tr>
<td>Cash</td>
<td>Β£500</td>
<td><a href="#">Link</a></td>
<td>18-Feb-17</td>
<td>Active</td>
</tr>
<tr>
<td>Sports Car</td>
<td>Β£5000</td>
<td><a href="#">Link</a></td>
<td>18-Jan-17</td>
<td>Expired</td>
</tr>
</table>
Thanks in advance.
source
share