Aaron Aaron - 4 months ago 31
jQuery Question

jQuery accordion plugin "active" problem

i'm using jquery accordion plugin. in this plugin first clickable menu element is already selected and active. i want all clickable elements are closed in accordion. how can i do this? i try "active: false" and "alwaysOpen: false" but not working. sorry for my poor english.


According to the jqueryui documentation, you need to set collapsible to true when you initialise it:

$( ".selector" ).accordion({ collapsible: true });

The example is from the jQueryUI documentation.