jQuery Accordion - open specific section on pageload

后端 未结 7 855
别那么骄傲
别那么骄傲 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条回答
  •  旧时难觅i
    2020-12-28 20:24

    You should write active: 1 instead of 2, because Accordion indexes sections from 0, not from one. Working code will look like that:

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

    Hope it will help a bit.

提交回复
热议问题