ScrollableTable 0.1

A class that makes table rows scrollable while keeping thead and tfoot fixed.



Details

Author
Massimiliano Torromeo
Current version
0.1
GitHub
mtorromeo/mootools-scrollable-table
Downloads
3195
Category
Interface
Tags
Report
GitHub Issues

Releases


Dependencies

  • core/1.2.4: *

How to use

ScrollableTable works by taking the source table and splitting it in 3 separate tables containing the thead, tbody and tfoot.

The widths of the table columns are kept in sync by the update() method that must be called manually every time the table content/layout changes.

A wrapper element with overflow:auto is created around the central table (tbody) and must be given a height/max-height style to be scrollable. The wrapper class can be specifiend in the class options.

The classes that were assigned to the original table will be automatically assigned to the auto-generated tables for the header and footer.

var table = new ScrollableTable('mytable', {
    wrapperClass: 'tableBody'
});

Working demo here: jsFiddle


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus