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
(
protected
-
conf
Collapse or uncollapse an element (transition on its height);
Parameters:
-
conf
Objectthe configuration
-
collapsedClass
Stringthe class to set/unset on the detectElement node
-
collapseElement
Node | HTMLElement | Stringthe DOM element which is collapsed/uncollapsed
-
[detectElement]
Node | HTMLElement | String optionalthe DOM element used to detect the current state, if not provided the
collapseElement
is used instead. -
[collapsedHeight=0]
String optionalthe height of the collapseElement when it is collapsed
-
[duration=0.3]
Number optionalthe transition duration
-
[easing=ease]
String optionalthe transition easing
-
[callback]
Function optionaloptional callback function called after the element has collapsed/uncollapsed
-