Table with Frozen Headers and Columns (Original Work)

Last Updated: 2020-06-18 23:12:00
1. Usage
1. Initialization:
1 | var table = new FixedTable("dataTable", 1); |
1), "dataTable": Native table ID (required parameter)
2), 1: Number of columns to freeze (frozen from left to right; optional parameter; must be a number greater than 0 and less than the total number of table columns. If omitted, no columns will be frozen.)
2. Destroy:
1 | table.destory(); |
After calling this method, the table will return to its original state before initialization. To clear the instance, manually set the instance to null.
3. Resize the Table:
1 | table.adjustTableSize(); |
Calling this method automatically recalculates the dimensions of the frozen sections of the table. It can be used when listening for window resize events:
1 2 3 | $(window).resize(function() { table.adjustTableSize();}); |
2. Notes
1. For multi-level headers, add the display:none class attribute to cells that should not be displayed.
2. This plugin does not support Internet Explorer.