Class: TableResponsive

Drupal. TableResponsive

new Drupal.TableResponsive(table)

The TableResponsive object optimizes table presentation for screen size.

A responsive table hides columns at small screen sizes, leaving the most important columns visible to the end user. Users should not be prevented from accessing all columns, however. This class adds a toggle to a table with hidden columns that exposes the columns. Exposing the columns will likely break layouts, but it provides the user with a means to access data, which is a guiding principle of responsive design.

Name Type Description
table HTMLElement

The table element to initialize the responsive table on.

Members

staticDrupal.TableResponsive.tablesArray.<Drupal.TableResponsive>

Store all created instances.

Methods

eventhandlerEvaluateColumnVisibility(e)

Name Type Description
e jQuery.Event

The event triggered.

eventhandlerToggleColumns(e)

Toggle the visibility of columns based on their priority.

Columns are classed with either 'priority-low' or 'priority-medium'.

Name Type Description
e jQuery.Event

The event triggered.