jQuery Accordion - open specific section on pageload

后端 未结 7 767
别那么骄傲
别那么骄傲 2020-12-28 19:57

I have a rather basic implementation of a jQuery Accordion on a page (using 1.3.2, jQuery UI Core 1.72 and jQuery UI Accordion 1.7.2), and I wish to open the 2nd section whe

7条回答
  •  伪装坚强ぢ
    2020-12-28 20:18

    As others have mentioned, the following will make it active on opening:

    $("#accordion").accordion({ active: 1 });
    

    It is active:1 since it is the 2nd of the accordion's index {0,1,2,...}; There seems to be some confusion in other answers as the element's contents contain the character "2"...

提交回复
热议问题