Accordion

Accordion

new Accordion(element, options)

Source:
Parameters:
Name Type Description
element HTMLElement

DOM element for component instantiation and scope

options Object
Properties
Name Type Description
sidebarItemSelector String

Selector for sidebar items that open on desktop

sidebarBreakpoint String

Media query for the desktop breakpoint

Classes

Accordion

Methods

destroy()

Description:
  • Destroy component.

Source:

init()

Description:
  • Initialise component.

Source:

syncSidebarItems()

Description:
  • Set each sidebar item's open state based on the current breakpoint.

Source:

(static) autoInit(root) → {Accordion}

Source:
Parameters:
Name Type Description
root HTMLElement

DOM element for component instantiation and scope

Returns:

An instance of Accordion.

Type
Accordion