0.0.14 • Published 6 years ago

@rhelements/cp-accordion v0.0.14

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

RHElements Accordion Element

Greenkeeper badge

Dev

npm run dev

Build

npm run build

Demo

Run http-server or python SimpleHTTPServer in the root directory of the component

Methods

toggle(index)

Toggles an accordion heading and panel.

const accordion = document.querySelector('cp-accordion');
accordion.toggle(0);

expand(index)

Expands an accordion heading and panel.

const accordion = document.querySelector('cp-accordion');
accordion.expand(0);

expandAll()

Expands all of the headings and panels.

const accordion = document.querySelector('cp-accordion');
accordion.expandAll();

collapse(index)

Collapses an accordion heading and panel.

const accordion = document.querySelector('cp-accordion');
accordion.collapse(0);

collapseAll()

Collapses all of the headings and panels.

const accordion = document.querySelector('cp-accordion');
accordion.collapseAll();

Events

cp-accordion-change (listens for)

Listens for cp-accordion-change event coming from the cp-accordion-heading element. This triggers an expand or collapse on the heading that has been selected.

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago