https://github.com/powerman/jquery-tbodyscroll
jQuery plugin: add scrolling for table tbody element
https://github.com/powerman/jquery-tbodyscroll
Last synced: 8 months ago
JSON representation
jQuery plugin: add scrolling for table tbody element
- Host: GitHub
- URL: https://github.com/powerman/jquery-tbodyscroll
- Owner: powerman
- License: mit
- Created: 2013-12-20T18:51:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T18:47:39.000Z (almost 10 years ago)
- Last Synced: 2025-05-06T03:58:06.377Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 6
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tbodyScroll jQuery plugin
=========================
Add vertical scrollbar to `` element and keep `` and
`` contents above/below table while scrolling body.
[Demo and examples](http://powerman.name/example/tbodyScroll/).
Tested on:
* jQuery 1.4.3
* Opera 10.63/Linux
* Opera 10.63/Windows
* Firefox 3.6.12/Linux
* Firefox 3.6.12/Windows
* Safari 5.0.2/Mac
* Chromium 7.0.517.41/Linux
* IE 8/Windows
## Usage
```javascript
$('table').tbodyScroll({
thead_height: '30px',
tbody_height: '80px',
tfoot_height: '20px',
head_bgcolor: 'transparent',
foot_bgcolor: 'transparent'
});
```
Required user CSS:
- User must define *same* width for `` and `` in each column,
because `` and `` will be "disconnected" from ``
and won't keep same width automatically anymore.
- Some changes in user CSS may be needed because `` will be wrapped
by `
`.
Required user markup (either `` or `` is optional):
```html
th.some, td.some { width: ...; }
th.other, td.other { width: ...; }
...
...
...
...
...
...
...
...
...
...
...
```
Generated markup:
```html
{table}
```