fixedHeader.enable()
Enable / disable the fixed elements.
Please note - this property requires the FixedHeader extension for DataTables.
Description
This method can be used to enable, and optionally disable, the table's fixed elements (i.e. header and footer). This can be useful if you wish to hide the table (see also fixedHeader.adjust()
) or otherwise manipulate the table in its original state.
Type
function fixedHeader.enable( [ enable ] )
- Description:
Enable or disable the fixed elements. When disabled, the table will remain static, regardless of end user scrolling.
- Parameters:
Name Type Optional 1 enable
Yes - default:true Flag to indicate if the FixedHeader elements should be enabled or disabled.
- Returns:
The DataTables API for chaining
Example
Disable the FixedHeader:
var table = new DataTable('#myTable');
table.fixedHeader.enable(false);
Related
The following options are directly related and may also be useful in your application development.