All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Changes event name to expand an accordion from
wf.accordion.expandedByHash
to more genericwf.accordion.expand
- Excludes disabled accordions from event-driven status changes
- Fixes a bug where an accordion set to expandOnStartup (via data-attr) that is also the target of the URL hash was toggled twice and ended up collapsed
- More unit tests
- Drops jQuery dependency
- Moves to ES Modules architecture, change folder location of the script
- Unit tests with Jest
- Handles nested HTML in accordion trigger placeholders
- Handles headings as (or nested in) accordion trigger placeholders
- Support initial expanding of a accordion via url-hash.
- Expanding accordions on page load is now triggered by the data attribute: 'data-wf-accordion-expanded'
- Data-attributes must be added to the accordions root element. 'js-accordion' by default.
- Ids for header/panel relationships will now be created with the root-elements id attribute value. If none is provided the script will create these with the accordion headers text.
- Support for disabled accordions
- Revised base markup pattern: a wrapping element around any group of accordions is now required.
- Changed plugin hook element: the plugin must now be invoked on wrapping group elements.
1.0.0 to 1.2.0 were the first versions of wfAccordion.