Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.59 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.59 KB

MooTools ResponsiveTable

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/

Usage

Arguments


new ResponsiveTable(table, options);
  1. table - (mixed) String selector or an Element referencing the table
  2. options - (object, optional) A key/value object for options

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'
  • 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
  • checkInputEvents - (array|string) The state of the display menu checkboxes are checked against these events default ['orientationchange', 'resize']

Events


  • checkInputState - (function) Checkbox state has been checked when a resize event fires
  • displayMenuToggle - (function) Display Menu is toggled