这里有一个工作示例:http://jsfiddle.net/Gajotres/eELYZ/
你只需要删除从li元素的标签。这就是所谓的只读列表视图:http://jquerymobile.com/demos/1.2.0/docs/lists/lists-readonly.html
<ul data-role="listview">
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
</ul>
编辑:
<div data-role="collapsible" data-theme="b" data-content-theme="c" id="outer-collapsible">
<h2>Choose a boat model...</h2>
<div data-role="collapsible" data-theme="c" data-content-theme="c" id="inner-collapsible">
<h2>Choose a boat model...</h2>
<ul data-role="listview">
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
</ul>
</div>
<div data-role="collapsible" data-theme="c" data-content-theme="c" id="inner-collapsible">
<h2>Choose a boat model...</h2>
<ul data-role="listview">
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
<li>
<h3>Stephen Weber</h3>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</li>
</ul>
</div>
</div>
新的工作例如:http://jsfiddle.net/Gajotres/eELYZ/
这几乎是我想要实现的,但文字实际上已经取代船列表项目。我需要的是当你点击其中一个列表项目时出现的文字。所以如果我点击Acura,那么这个斯蒂芬韦伯位就会出现在下面。 – Wayneio 2013-03-27 13:36:57
所以基本上你想要在可折叠下可折叠?一个可折叠将导致另一个可折叠的,这将导致正常的只读listview? – Gajotres 2013-03-27 13:39:21
是的,基本上每个列表项在点击时都会有一个可折叠的下方。 – Wayneio 2013-03-27 13:40:43