How to Close jQuery Accordion on Page Load

Hello all,

I would like to have all the accordion div’s CLOSED onload, but cannot figure out how. Here is my code:

jQuery().ready(function(){
        // simple accordion
        jQuery('#list').accordion({
            autoheight: false,
            collapsible: true,
            alwaysOpen: false
        });
});

Where do I put “hide()” or ??? I’ve tried it all over the place.

Thanks!

Set active to false:


jQuery().ready(function(){
        // simple accordion
        jQuery('#list').accordion({
            [B]active: false,[/B]
            autoheight: false,
            collapsible: true,
            alwaysOpen: false
        });
});

hi, is it possible modifie this same code to chose which panel you want to be open at the opening of a page?

The documentation is very useful for answering these kinds of questions.

Go to the jquery accordion page, select the Options tab, click on the active option and read what’s there.

exactly what i needed , works great ! thank you