new Accordion()
Main accordion class constructor
Methods
(private, static) _generate()
Create the accordion menu with the items from the data object supplied
(private, static) _handleToggle()
Handle toggle an accordion panel open or closed
(private, static) _handleTransitionEnd()
Handle the transition end state for the content open/close action given that the accordion uses CSS transitions
(private, static) _initialize()
Initialize the component
(private, static) _removeEvents()
Remove all registered events from the current accordion instance
(private, static) _render()
Render the component element, this method can be called any number of times if the data for the component is added again
(private, static) _setElements()
Returns an object with the default html elements added
(private, static) _setEvents()
Set the events for accordion panels and toggle buttons
(static) destroy()
Destroy the component and remove all elements from the dom and clear all events added, returns a null value in the event the object was stored in a reference to nullify the reference
(static) disable()
Disable the select menu item
(static) enable()
Enable the select menu item
(static) getContent(index)
Return one or all content panels
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | Optional index of the panel to return |
(static) update(data)
Update the select list
Parameters:
Name | Type | Description |
---|---|---|
data |
object | The data object to update with |
(static) update(data, index)
Update the content of the panels only
Parameters:
Name | Type | Description |
---|---|---|
data |
object | The data object to update with |
index |
Number | Optional index to update only the specified index |