Class: TableResponsive

Drupal.TableResponsive(table)

new 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.

Parameters:
Name Type Description
table HTMLElement

The table element to initialize the responsive table on.

Source:

Members

(static) tables :Array.<Drupal.TableResponsive>

Store all created instances.

Type:
Source:

Methods

eventhandlerEvaluateColumnVisibility(e)

Parameters:
Name Type Description
e jQuery.Event

The event triggered.

Source:

eventhandlerToggleColumns(e)

Toggle the visibility of columns based on their priority.

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

Parameters:
Name Type Description
e jQuery.Event

The event triggered.

Source: