Determing table cell values

Determing table cell values

I have a table cell with numeric values which are getting evaluated inconsistently.  It's pretty straightforward what I'm trying to do but the Css class is being applied only in some cases.  I've looked at the html source code and verified that actual value in the table cell.  I'm not sure what I'm doing wrong.  Thanks

//DirAge - Age
var DirAge = parseInt(jQuery("#DirAge").text(), 10);
           
if (parseInt(DirAge > 70)) {
    jQuery("#DirAge").addClass("bgHighlight");
}




<td id="DirAge">72</td> 

I also tried var DirAge = parseInt(jQuery("#DirAge").val(), 10);