I'm trying to add conditional formatting to the following;
<tr> <td><h3>Company</h3></td> <td><h3>Price</h3></td> <td><h3>Change</h3></td> </tr> <tr> <td>Example</td> <td>123.4</td> <td>-1</td> </tr>
Where if column "change" is 0 or below the font is red, and green if else.
I found this fiddle, http://jsfiddle.net/davidThomas/Ty497/, which I can adapt, but I can't get it to only work on the third column.
preguntado el 28 de agosto de 12 a las 10:08
Simply change the jQuery selector to
$('tbody tr td:nth-child(3)') so that it only applies to the third cell of each row.
I've gone through the provided link.
The solution for your problem is to change the code in two places:
Change the condition in the function for poor is
1and very poor to
Change the color for poor in the css part.