ColVis example Two tables with individual controls

It can be useful to have DataTables initialise more than one table with a single call can for them to each have individual ColVis controllers. All this requires is a suitable jQuery selector to be used, and DataTables and ColVis will take care of the rest - as shown in this example.

NamePositionOfficeAgeSalary
NamePositionOfficeAgeSalary
Cedric Kelly Senior Javascript Developer Edinburgh 22 $433,060
Dai Rios Personnel Lead Edinburgh 35 $217,500
Gavin Joyce Developer Edinburgh 42 $92,575
Jennifer Acosta Junior Javascript Developer Edinburgh 43 $75,650
Martena Mccray Post-Sales support Edinburgh 46 $324,050
Mostrando 1 a 5 de 9 registros
NamePositionOfficeAgeSalary
NamePositionOfficeAgeSalary
Angelica Ramos Chief Executive Officer (CEO) London 47 $1,200,000
Bradley Greer Software Engineer London 41 $132,000
Bruno Nash Software Engineer London 38 $163,500
Haley Kennedy Senior Marketing Designer London 43 $313,500
Hermione Butler Regional Director London 47 $356,250
Mostrando 1 a 5 de 12 registros

The Javascript shown below is used to initialise the table shown in this example:

1
2
3
4
5
6
$(document).ready(function() {
    $('table.display').DataTable( {
        dom: 'C<"clear">lfrtip',
        displayLength: 5
    } );
} );

In addition to the above code, the following Javascript library files are loaded for use in this example: