Accordion Class

A custom widget used to create an accordian control.

Constructors

Accordion( parent, config )
Used to instantiate this class
parentDOM element in which to render this component
configConfiguration settings (optional). See config options for more information.

Config Options

activeOnTop
animate
animationSteps
defaultTab

Events

onHeaderClick( title, header, panel, event )
Called whenever a header is clicked.
beforeChange( )
Called before a panel is raised.

Public Methods

enableAnimation( )
disableAnimation( )
add( el, header )
Used to add a tab/panel to the accordion control.
elElement (e.g. div or span) to add to the accordion. It is recommended that the element have a "title" attribute that can be used as the header label
headerIf the el doesn't have a "title" attribute, you can pass in a string to use as the header label. Alternatively, you can pass in a custom html element to use as the header.
getCurrentTab( )
open( id )
Used to raise/open a panel on the accordion control.
idThe index number or title of the panel you want to raise.
resize( )
Used to resize the open panel whenever the browser is resized.
afterChange( )
Called after a panel is raised.