How to make function give row that have different value with color red to full row ?
problem
How to give red color for rows on html table that have different values on same row ?
I need when at least one cell from row different from each others
then give red font to full row
if you see below row that have same value on all cell not changed color .
I need function give red color for row that have at least one value different from others on same row
so How to make function do that by jquery or java script do red color for row if it have
at least different cell value .
rows have different values give red rows font
result i need as below
sample below
- <!DOCTYPE html>
- <html>
- <body>
- <table border="1">
- <col width="500">
- <col width="500">
- <col width="500">
- <col width="500">
- <tr bgcolor="#6699FF" width="100%">
- <th>Part1</th>
- <th>Part2</th>
- <th>Part3</th>
- <th>Part4</th>
- <tr>
- <td>12</td>
- <td>12</td>
- <td>12</td>
- <td>12</td>
- </tr>
- <tr>
- <td>12</td>
- <td>15</td>
- <td>12</td>
- <td>12</td>
- </tr>
- <tr>
- <td>17</td>
- <td>15</td>
- <td>13</td>
- <td>12</td>
- </tr>
- </table>
- <button id="button">Click Me</button>
- </body>
- </html>