Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

datatable change classname by value

$('#example').dataTable( {
  "rowCallback": function( row, data ) {
    if ( data.grade == "A" ) {
      $('td:eq(0)', row).addClass("text-success");
    }
  }
} );
Source by datatables.net #
 
PREVIOUS NEXT
Tagged: #datatable #change #classname
ADD COMMENT
Topic
Name
2+7 =