FixedColumns example Multiple fixed columns

FixedColumns allows more than one column to be frozen into place using the leftColumns parameter. The example below shows two columns fixed.

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

1
2
3
4
5
6
7
8
9
10
11
$(document).ready(function() {
    var table = $('#example').DataTable( {
        scrollY:        "300px",
        scrollX:        true,
        scrollCollapse: true,
        paging:         false
    } );
    new $.fn.dataTable.FixedColumns( table, {
        leftColumns: 2
    } );
} );

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