jQuery UI Accordion (hiding all by default)

Atif picture Atif · Sep 19, 2010 · Viewed 7.5k times · Source

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

Answer

Henrik P. Hessel picture Henrik P. Hessel · Sep 19, 2010

This code should accomplish this

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