how do I removeClasses from a single cell in a single row?
how do I removeClasses from a single cell in a single row?
 thegamechangerpro            
            
                Posts: 81Questions: 30Answers: 1
thegamechangerpro            
            
                Posts: 81Questions: 30Answers: 1            
            I use the below for changing the class of a row, but I'm trying to accomplish the same thing for a single cell
First I get the rowId using a find and then apply the changes.   What is the equivalent of this for a cell?
This an injection into a table so i can't build a test case because it runs in another program.
var rowId = $('#table').dataTable()
   .fnFindCellRowIndexes('$pk', 0);
table.row(rowId).nodes().to$().removeClass('lightGreen');
table.row(rowId).nodes().to$().removeClass('lightAmber');
table.row(rowId).nodes().to$().addClass('$status');
This question has an accepted answers - jump to answer
Answers
Use the
cell()API to interact with one or more cells. More specificallycell().node()to apply and remove classes.Kevin