1.0.0 • Published 6 years ago

@ak1ra/jquery-accordion v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

jquery-accordion.js

Basic setup

Options

OptionTypeDefaultInfo
animatedbooltruewill be passed to the collapsible plugins
caclDeltafunctioncalcDelta() { return 0; }will be passed to the collapsible plugins
currentint0initially shown collapsible
contentselector.content
contentClassstringcontent
debugboolfalseshow debug messages eg function calls
debugCollapsiblesboolfalsedebg messages for the collapsibles-plugin
elementsjQuery Selector$()
elementsClassstringelement
multipleintfalseset to allow multiple items to be shown at once
triggerselectortrigger
triggerClassstringtrigger

(public) Functions

FunctionArgumentsReturnInfo
gotostepnumber (int), isIndex (bool)current (int)set which collapsible should be shown, for passing an index, the second argument needs to be filled
updatenonecurrent (int)resets the display of the accordion based on the stored data
getCurrentnonecurrent (int)returns the currently open collapsible

Events

EventDataInfo
changecurrent (int)will trigger after the current item has changed
initcurrent (int)will trigger when the init process has concluded
updatecurrent (int)will trigger when the status of the plugin was restored from the stored staus

TODOs

  • proper documentation
  • add destroy function