new Responsiville.Accordion(options)
Creates and initialises the accordion.
Name | Type | Description |
---|---|---|
options |
Object | The initialisation options of the module. |
- License:
- Nevma Copyright (c) http://www.nevma.gr
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options that define the object
behaviour.
Properties
|
Fires:
Extends
Members
-
staticResponsiville.Accordion.AUTO_RUN
-
Properties:
Name Type Description AUTO_RUN
boolean Controls whether this module should run by default, without the developer calling it, using its default settings. Defaults to true. -
staticResponsiville.Accordion.defaults
-
Properties:
Name Type Description defaults
Object Default values for this module settings.
Methods
-
staticResponsiville.Accordion.autoRun(){void}
-
Runs through the page and searches for elements that apply to the current module in order to apply it to them automatically. Useful for automatically creating elements with this module's behaviour just by setting up the predefined classes and data attributes in HTML elements of the page.
Returns:
Type Description void -
closePanel($panel){void}
-
Closes and hides the contents of an accordion panel.
Name Type Description $panel
jQuery The accordion panel jQuery object whose contents are to be hidden. Fires:
Returns:
Type Description void -
disable(){void}
-
Disables the accordion.
Fires:
Returns:
Type Description void -
enable(){void}
-
Enables the accordion.
Fires:
Returns:
Type Description void -
headerClick(event){void}
-
Handles the click event on an accordion panel header element.
Name Type Description event
Event The user click event sent by the browser. Returns:
Type Description void -
openPanel($panel){void}
-
Opens and shows the contents of an accordion panel.
Name Type Description $panel
jQuery The accordion panel jQuery object whose contents are to be shown. Fires:
Returns:
Type Description void -
setupEvents(){void}
-
Sets up event handlers necessary for the object to function properly.
Returns:
Type Description void -
setupEvents(){void}
-
Sets up event handlers necessary for the object to function properly.
Returns:
Type Description void
Events
-
closed
-
Called after the panel has closed.
-
closed
-
Called after the panel has closed.
-
closed
-
Called after the panel has closed.
-
closing
-
Called before closing the panel.
-
disabled
-
Called after the accordion has been disabled.
-
enabled
-
Called after the accordion has been enabled.
-
Called after the module has been initialised.
-
Called after the module has been initialised.
-
opened
-
Called after the panel has been opened.
-
opened
-
Called after the panel has been opened.
-
opened
-
Called after the panel has been opened.
-
opening
-
Called before opening the panel.