我对 jQuery Mobile 网站上的示例感到困惑,可折叠设置有 5 个部分。看起来第 1 部分应该打开,但事实并非如此。
第 3 部分说“我默认隐藏”,但它是在 Google Chrome 中打开的。
我对 jQuery Mobile 网站上的示例感到困惑,可折叠设置有 5 个部分。看起来第 1 部分应该打开,但事实并非如此。
第 3 部分说“我默认隐藏”,但它是在 Google Chrome 中打开的。
该示例与下面显示的实际示例没有任何关系。您所指的示例有 2 个元素,而真正的底部示例有 5 个。
这是一个底部示例,您可以在页面源中看到它:
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="false">
<h3>Section 1</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm open by default because I have the <code>data-collapsed="false"</code> attribute.</p>
</div>
<div data-role="collapsible">
<h3>Section 2</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
</div>
<div data-role="collapsible" data-collapsed="false">
<h3>Section 3</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
</div>
<div data-role="collapsible">
<h3>Section 4</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
</div>
<div data-role="collapsible">
<h3>Section 5</h3>
<p>I'm the collapsible content in a set so this feels like an accordion. I'm hidden by default because I have the "collapsed" state; you need to expand the header to see me.</p>
</div>
</div>