A custom widget used to create an accordian control.
Constructors
Accordion( parent, config )
Used to instantiate this class parent | DOM element in which to render this component | config | Configuration settings (optional). See config options for more information. |
Config Options
Events
onHeaderClick( title, header, panel, event ) Called whenever a header is clicked.
beforeChange( ) Called before a panel is raised.
Public Methods
add( el, header ) Used to add a tab/panel to the accordion control.
el | Element (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 | header | If 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. |
open( id ) Used to raise/open a panel on the accordion control.
id | The 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.
|
|