Changing css value of th with jquery

Changing css value of th with jquery

kreso191kreso191 Posts: 5Questions: 5Answers: 0

I have a dataTable and I want to change color of th (not the background color) to red when specific requirements are met, but it doesn't work.

<th colspan="10" id="foto" contenteditable="true"></th>

It's empty now, but when ajax returns it is filled with the sum and when that sum is bigger than specified it should turn red.

$("#foto").css( "color", "red" );

If I change the element on which to do the .css() it works as long as it is outside the table.

This discussion has been closed.