0

I am using accordion menu

 $(function() {
        $( ".accordion" ).accordion({
            collapsible:true,
            heightStyle: "content"
        });
    });

it is working fine shown as in example but I want all the menu closed by default and in this code first menu is expanded so what should I do ?

Chintan Gor
  • 1,062
  • 2
  • 15
  • 35

2 Answers2

1

Along with collapsible:true add active: false

Suresh
  • 923
  • 1
  • 10
  • 21
0

Please add one more parameter to you current code. Instead this

$(function() {
    $( ".accordion" ).accordion({
        collapsible:true,
        heightStyle: "content"
    });
});

Kindly use below code...

$(function() {
    $( ".accordion" ).accordion({
        collapsible:true,
        active:1,
        heightStyle: "content"
    });
});

active: 1 means zero index you can set any of your accordion index by checking your item index of you accordion.

For Reference Click Here

Hassan Raza
  • 671
  • 10
  • 27