Why doesn't the row get the class added to it?

Why doesn't the row get the class added to it?

AdamOneAdamOne Posts: 6Questions: 0Answers: 0
edited July 2012 in General
I have this datatable That I want to have different row color for each row, I am using the following code but the CSS datatables background class always replaces my own background class

var oTableNE = $('#tabelNE').dataTable({
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
// Bold the grade for all 'A' grade browsers
if ( aData[8] == "Submitted" )
{
$(nRow).addClass("submittedColor");
console.log("Change Color by adding CSS Class" + " nRow " +nRow + " " +aData[0] + " | " +aData[1] + " | " +aData[2]+ " | " +aData[8]);
}else{
console.log("Don't Change Color" + " nRow " +nRow + " " +aData[0] + " | " +aData[1] + " | " +aData[2]+ " | " +aData[8]);
}
}
});

Replies

  • AdamOneAdamOne Posts: 6Questions: 0Answers: 0
    Nevermind... I was using the selector wrong... I already have the TR object in nRow so I simply select that and use Important! in the CSS
This discussion has been closed.