Port of Filament Group's Responsive Table jQuery plugin. Allows a default set of columns to be shown at different screen sizes and enables user to toggle them with a display menu.
jsfiddle demo: http://jsfiddle.net/Blink/kZUg8/
new ResponsiveTable(table, options);
- table - (mixed) String selector or an Element referencing the table
- options - (object, optional) A key/value object for options
-
classes - (object) CSS Classes
- enhanced - (string) Applied to the table when an instance is created default
enhanced
- persist - (string) If present, the Class ignores this column and always shows it default
persist
- colHidden - (string) Applied when a column is hidden by a checkbox default 'col-hidden'
- colVisible - (string) Applied when a column is shown by a checkbox default 'col-visible'
- enhanced - (string) Applied to the table when an instance is created default
-
displayMenu - (object) Options for the element that contains the display checkboxes
- linkText - (string) Text used in the link default
Display columns
- position - (string) Where the display menu is injected in relation to the container default
top
- linkText - (string) Text used in the link default
-
checkInputEvents - (array|string) The state of the display menu checkboxes are checked against these events default
['orientationchange', 'resize']
- checkInputState - (function) Checkbox state has been checked when a resize event fires
- displayMenuToggle - (function) Display Menu is toggled