API Docs for: 1.0.0
Show:

eZ.AccordionElement Class

Extension providing the _collapse method which allows to create an accordion effect on elements with a nice transition on its height.

Item Index

Methods

Methods

_collapse

(
  • conf
)
protected

Collapse or uncollapse an element (transition on its height);

Parameters:

  • conf Object

    the configuration

    • collapsedClass String

      the class to set/unset on the detectElement node

    • collapseElement Node | HTMLElement | String

      the DOM element which is collapsed/uncollapsed

    • [detectElement] Node | HTMLElement | String optional

      the DOM element used to detect the current state, if not provided the collapseElement is used instead.

    • [collapsedHeight=0] String optional

      the height of the collapseElement when it is collapsed

    • [duration=0.3] Number optional

      the transition duration

    • [easing=ease] String optional

      the transition easing

    • [callback] Function optional

      optional callback function called after the element has collapsed/uncollapsed