[jQuery] AND OR Expression
I having trouble with this line
if (td4th.text() > '4') || (td4th.text() > '2' && (activeCEO ==
'Yes'))
In plain English, I want it to be true if
td4th > 4
OR
td4th > 2 AND activeCEo = 'Yes'
Thanks
$('#tblBoardDirectors tr').each(function() {
var relStatus = ($('td:nth-child(5)', $(this)).text())
var activeCEO = ($('td:nth-child(12)', $(this)).text
());
{
if (relStatus != 'Retired') {
var td4th = $('td:nth-child(4)', $
(this));
if (td4th.text() > '4') || (td4th.text() >
'2' && (activeCEO == 'Yes'))
td3rd.addClass(bgColor);
}
}
});
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home