An open API service indexing awesome lists of open source software.

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

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}


```