Usage

Initialisation and configuration of FixedHeader is performed through the fixedHeader initialisation option for DataTables. This option can be given as a simple boolean value to enable FixedHeader with its default configuration, or as an object to provide more granular control.

Simple initialisation

In its most simple case, you can enable FixedHeader by simply setting fixedHeader: true as an option in the DataTables initialisation:

new DataTable('#myTable', {
    fixedHeader: true
});

Options

For more complex cases, the fixedHeader option can be used as an object allowing you to configure its features to suit your needs. In this example, both the header and footer are set to be fixed:

new DataTable('#example', {
    fixedHeader: {
        header: true,
        footer: true
    }
});

Reference

For a complete list of the options that FixedHeader supports, please refer to the DataTables initialisation options reference. The FixedHeader examples also demonstrate the options available.