https://github.com/springload/responsive-table-column-switcher
A simple, Javascript-driven way to render tables on small screens.
https://github.com/springload/responsive-table-column-switcher
responsive-table
Last synced: 11 months ago
JSON representation
A simple, Javascript-driven way to render tables on small screens.
- Host: GitHub
- URL: https://github.com/springload/responsive-table-column-switcher
- Owner: springload
- Created: 2014-10-12T23:36:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-12T23:45:19.000Z (over 11 years ago)
- Last Synced: 2025-02-01T06:25:36.085Z (about 1 year ago)
- Topics: responsive-table
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 25
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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.