如何自动打开第一个可折叠集(手风琴)?
我有一个可折叠的设置,当页面加载时,我想自动打开第一个可折叠的设置。
我是怎么在jquerymobile中那样做的?
从文档中您可以使用data-collapsed=false
Section 1
I'm the collapsible set content for section 1.
Section 2
I'm the collapsible set content for section 2.
您也可以通过pageinit
事件上的代码执行此pageinit
:
$("#myCollapsibleSet").children(":first").trigger("expand");
假设#myCollapsibleSet
是您的可折叠集的ID。