jTableScroll
jTableScroll

A powerful jQuery extension that automates scrolling and fixed headers and footers.

By default it will size a table to it's parent container, fix the position of the header and footer, add horizontal and vertical scrolling as needed, and resize reactively to window resize events.

Repository

GitHub

License

MIT

Changelog

1.6.0

Fixed possible footer offset issue. Added Sample to GitHub. Added to bower repository.

1.5.2

Minor update to prevent error in IE10/11 after minification

1.5.1

Better scrollbar handling on resize

1.5

Reactive option added for reactive UI (bootstrap, etc) Better auto height

1.4.1

minor fix to padded footer div bgcolor

1.4

Add initial color inheritance to header/footer

1.3

IE8 support (double header) Header div css class

1.2

Added Header/Footer click event handling

1.1.1

force table-layout fixed to force alignment

1.1

Added auto-scrollbars and fixed footer

1.0.1

remove console.log

1.0.0

Initial Release
Install

(bower): bower install jtablescroll
(npm): npm install jtablescroll
(nuget): Install-Package jTableScroll
Html

<table id="tableToScroll">
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
            <th>Column 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Data 1</td>
            <td>Data 2</td>
            <td>Data 3</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <td>Foot 1</td>
            <td>Foot 2</td>
            <td>Foot 3</td>
        </tr>
    </tfoot>
</table>
Javascript

<script src="jquery.jTableScroll-1.6.0.js"></script>
<script>
    $('#tableToScroll').jTableScroll(options);
</script>
Options (JSON Object)

{
reactive: (bool)(optional)(default: true) enable reactive sizing to parent control
width: (int)(optional) desired max width in pixels
height: (int)(optional) desired height in pixels
backgroundcolor: (string)(optional)(default: #fffff) table header bg color
}
Example

Col 1 Col 2 Col 3 Col 4 Col 5 Col 6
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
2asdfasdfasdfafsd asdfasdfasdf asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv asdfasdfasdfasdgv
Footer Content
Another Material Column