這裏有一個工作示例: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