The plugin default options are as follows:
{
cssClose: 'accordion-close', //class you want to assign to a closed accordion header
cssOpen: 'accordion-open', //class you want to assign an opened accordion header
cookieName: 'accordion', //name of the cookie you want to set for this accordion
cookieOptions: { //cookie options, see cookie plugin for details
path: '/',
expires: 7,
domain: '',
secure: ''
},
defaultOpen: '', //id that you want opened by default
speed: 'slow', //speed of the slide effect
bind: 'click', //event to bind to, supports click, dblclick, mouseover and mouseenter
animateOpen: function (elem, opts) { //replace the standard slideDown with custom function
elem.next().slideDown(opts.speed);
},
animateClose: function (elem, opts) { //replace the standard slideUp with custom function
elem.next().slideUp(opts.speed);
}
}
Details
- cssClose - class assigned when closed
- cssOpen - class assigned when opened
- cookieName - cookie name for persisting panels
- cookieOptions - see jquery.cookie plugin for more info
- defaultOpen - id that you want opened by default
- speed - animation speed
- bind - event that triggers the collapsible, only
4 are supported:
click, dblclick, mouseenter, and mouseover
- animateOpen - custom callback to animate opening
- animateClose - custom callback to animate closing