Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjpclab/jquery-table-fixed-header
Make table header fixed on the top when scrolling down. 当往下滚动时固定表头到顶部。
https://github.com/mjpclab/jquery-table-fixed-header
jquery-plugin table-header
Last synced: 21 days ago
JSON representation
Make table header fixed on the top when scrolling down. 当往下滚动时固定表头到顶部。
- Host: GitHub
- URL: https://github.com/mjpclab/jquery-table-fixed-header
- Owner: mjpclab
- License: isc
- Created: 2015-05-23T02:48:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-29T10:42:23.000Z (over 1 year ago)
- Last Synced: 2024-11-10T13:13:44.555Z (about 2 months ago)
- Topics: jquery-plugin, table-header
- Language: TypeScript
- Size: 391 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jQuery table fixed header
## Compatibility
Modern browsers that follows standards and IE7+## Usage
```javascript
$("table").tableFixedHeader();
``````javascript
$("table").tableFixedHeader({
headerRows: 2 //if your header have more than 1 row
/*, other options */
});
``````html
......
```
## Html Structure
The fixed header element will keep the same table group container as original table(such as `thead` or `tbody`).The fixed header is just cloned from the original table. It follows after the original one to get CSS stylesheet rules applied as much as possible. Inline styles will also be cloned. However, the `id` attribute will be removed from cloned elements to make sure the `id` is unique in the page. If you apply your CSS by id, that would not work for cloned elements.
## Options
`headerRows`
The number of leading rows from table that will be fixed.`fixedClass`
CSS class for cloned fixed table.`fixedTop`
Top offset of the fixed header. Can be a number (of pixels) or a function that returns the value. Useful if you already have a fixed page header.`scrollContainer`
Determine the parent scroll container. Fixed header will locate based on that container.