Skip to content

springload/responsive-table-column-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple, Javascript-driven way to render tables on small screens. Below a certain width, the table condenses into two columns and the user can choose which column to display by changing the value of a select element.

For now this is a proof-of-concept. It will probably bork with tables that use colspan, or don’t follow a very similiar structure to the ones in index.html.

Anyway, just load table-column-switcher.js into your document, and add these data- attributes to your table:

data-column-switch

Tells javascript to modify this table

data-column-switch-cols='2 3'

Tells javascript which columns to make switchable.

data-column-switch-default-col='3'

Tells javascript which column to show by default.

About

A simple, Javascript-driven way to render tables on small screens.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published