I have a list where the font style and color for the rows are conditionally formatted based on the value of the status column. I don't want to highlight the row, just change the font. Below is an example:
To achieve the font styles the below code works fine when "group by" is set to "expanded" but when I set the group by setting to "collapsed" the code not longer works. Evidently missing something but not sure what.
$(function(){
$("td.ms-vb2").each(function(){
var that = $(this);
if (that.text() == "Not Approved"){
that.parent("tr").children("td").css("color", "#B0E0E6");
that.parent("tr").children("td").css("font-style", "italic");
}
else if (that.text() == "Pending"){
that.parent("tr").children("td").css("color", "#FF0000");
that.parent("tr").children("td").css("font-style", "italic");
}
});