Accordion - Don't want to make first cell acti

2019-09-07 10:59发布

Well I am using jQuery accordion. Below is what I have

$(document).ready(function(){
    $("#accordion001").accordion({
        collapsible: true,
        autoHeight: false,
        navigation: true
    });
});

The problem is that it always shows the first link data by default.

+++++++++++++++++++++++++++++++++++++++
+   Link 1                            +
+     Link 1 line 1                   +
+     Link 1 line 2                   +
+     Link 1 line 3                   +
+   Link 2                            +
+   Link 3                            +
+   Link 4                            +
+++++++++++++++++++++++++++++++++++++++

I don't want to show first link data. I just want to show all available links as below.

+++++++++++++++++++++++++++++++++++++++
+   Link 1                            +
+   Link 2                            +
+   Link 3                            +
+   Link 4                            +
+++++++++++++++++++++++++++++++++++++++

Is it doable? What option do I need to write?

2条回答
对你真心纯属浪费
2楼-- · 2019-09-07 11:04
$("#accordion001").accordion({
        collapsible: true,
        autoHeight: false,
        navigation: true,
        active:false,
    });

this should work.

查看更多
我想做一个坏孩纸
3楼-- · 2019-09-07 11:21

$( "#accordion001" ).accordion( "option", "active", 2 );

and it will be opened in load time.

查看更多
登录 后发表回答