Question

Hello I am using jQuery UI Accodions

By default, the first accordion is shown and other are hidden. I would like to hide all the accordions by default until the user clicks it.

How do I do that ?

Thank You

Was it helpful?

Solution

This code should accomplish this

$( ".selector" ).accordion({ active: false });

OTHER TIPS

This is the updated code to accomplish the appropriate.

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

"Setting active to false will collapse all panels. This requires the collapsible option to be true." http://api.jqueryui.com/accordion/#option-active

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top