medk
medk

Reputation: 9529

jquery ui accordion

Is it possible to make the jQuery UI Accordion first loads collapsed, so, no tab will load opened or active in default.

I know the option to make it collapsible but I want it to load totally collapsed then the user choses one tab.

I'm using the latest jquery 1.4.4 + jquery UI custom 1.8.6

Thanks.

Upvotes: 0

Views: 1114

Answers (4)

Nimi
Nimi

Reputation: 42

this worked for me:

$("#accordion").accordion({
            heightStyle: "content", header: "h3", collapsible: true, active: false
        });

Upvotes: 0

Gregg B
Gregg B

Reputation: 13717

Set active to false

which is the same as setting each tab to display:none;

Upvotes: 3

Bojangles
Bojangles

Reputation: 101473

Simply set all the according content elements to display: none. This will hide them all, until clicking the accordion title expands the content under it.

James

Upvotes: 1

Related Questions