I have a table populated by a SQL lookup. Each column is a Number column. I would like each row in the table that meets the following criteria to be highlighted in yellow:
OP=10 and STD <.20 or >2.00
I copied from another form I used when someone helped me in the past with scripting. And I tried to modify it to do what I am looking for. However, I evidently don't know enough to modify it for my requirements.
(document).ready(function () {
$('.cf-table-block').on('blur', 'input', sumtotal);
{
var sum = 0;
$('.cf-table-block tbody tr').each(function () {
var s = 0;
o = parseNumber($(this).find('.OP input').val())
s = parseNumber($(this).find('.STD input').val());
$(this).find('.subtotal input').val(s);
if ((o = 10) && (s > 2)) {
$(this).closest('tr').css("background", "yellow");
}
else {
$(this).closest('tr').css("background", "none");
}
});
}
function parseNumber(n) {
var f = parseFloat(n); //Convert to float number.
return isNaN(f) ? 0 : f; //treat invalid input as 0;
}
});
Thank you for any help you can provide.