Added Highlight class inside other features

Added Highlight class inside other features

toplisektoplisek Posts: 26Questions: 5Answers: 0
edited December 2015 in Free community support

I'm checking how to add also highlight feature.

Please find working code:

Mytable = {
init: function() {
 $('#example').DataTable(
   {
   "paging": true,
   "ordering": true,
   "info": true,
   "lengthMenu":[[40, 60, 80, -1],[40, 60, 80, "Alles"]],
   language: {
    "url": "german.json"
    }
   }
  );
 }
} 

I like to add highlight feature for row.
https://www.datatables.net/examples/api/highlight.html
var table = $('#example').DataTable();

$('#example tbody')
    .on( 'mouseenter', 'td', function () {
        var colIdx = table.cell(this).index().column;

        $( table.cells().nodes() ).removeClass( 'highlight' );
        $( table.column( colIdx ).nodes() ).addClass( 'highlight' );
    } );
This discussion has been closed.