Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

mtorromeo/mootools-scrollable-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScrollableTable

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

Screenshot

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.

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

Working demo here: jsFiddle

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published