Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | # FixedHeader |
| 2 | |||
| 3 | At times it can be useful to ensure that column titles will remain always visible on a table, even when a user scrolls down a table. The FixedHeader plug-in for DataTables will float the 'thead' element above the table at all times to help address this issue. The column titles also remain click-able to perform sorting. Key features include: |
||
| 4 | |||
| 5 | * Fix the header to the top of the window |
||
| 6 | * Ability to fix the footer and left / right columns as well |
||
| 7 | * z-Index ordering options |
||
| 8 | |||
| 9 | |||
| 10 | # Installation |
||
| 11 | |||
| 12 | To use FixedHeader, first download DataTables ( http://datatables.net/download ) and place the unzipped FixedHeader package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser. |
||
| 13 | |||
| 14 | |||
| 15 | # Basic usage |
||
| 16 | |||
| 17 | FixedHeader is initialised using the `$.fn.dataTable.FixedHeader()` object. For example: |
||
| 18 | |||
| 19 | ```js |
||
| 20 | $(document).ready( function () { |
||
| 21 | var table = $('#example').dataTable(); |
||
| 22 | new $.fn.dataTable.FixedHeader( table ); |
||
| 23 | } ); |
||
| 24 | ``` |
||
| 25 | |||
| 26 | |||
| 27 | # Documentation / support |
||
| 28 | |||
| 29 | * Documentation: http://datatables.net/extensions/FixedHeader/ |
||
| 30 | * DataTables support forums: http://datatables.net/forums |
||
| 31 | |||
| 32 | |||
| 33 | # GitHub |
||
| 34 | |||
| 35 | If you fancy getting involved with the development of FixedHeader and help make it better, please refer to its GitHub repo: https://github.com/DataTables/FixedHeader |
||
| 36 |