2011-08-14 111 views
0

我想在右側獲取圖片,但它始終顯示爲箭頭。jQuery Mobile拆分按鈕列表問題

<ul data-role="listview" data-theme="g"> 


<li> 
<a href="#"> 
<img src="../Images/play_button.gif" width="16" height="16" class="ui-li-icon" /> 
<span>Item 1</span> 
<span class="ui-li-count">12</span> 
</a> 

<a href="#"> 
     // I want an image to appear here 
</a> 

</li> 

<li> 
<img src="../Images/play_button.gif" width="16" height="16" class="ui-li-icon" /> 
<span>Item 2</span> 
<span class="ui-li-count">9</span> 
</li> 

</ul> 

回答

0

我不知道究竟什麼是錯的,你正在使用列表視圖佈局, 我會學習的文件,並將它與你的代碼

http://jquerymobile.com/demos/1.0a1/#docs/lists/index.html

+8

這是主要問題之一!文檔很爛! jQuery Mobile團隊應該在文檔中投入一些時間。 – azamsharp

+3

查看源代碼不會有太大的幫助,因爲它對動態添加的類看起來會非常混亂。他們應該提供一些片段。 –

0

,我發現這是列表的概述:http://www.youtube.com/watch?v=YaZhS_8vaYo這表明,因爲整個內容被包裝在一個<a>,我想,如果你把一個H3內部的鏈接,它會變得更加包含的,沒有顯示錯誤的箭頭。我唯一沒有想到的是一個自定義圖標;你可能只是漂浮它。

+0

有趣的是,我無法複製... –

0

我看頁面的源代碼,並發現它非常有幫助... lists-split.html

看起來是這樣的。

<ul data-role="listview" data-split-icon="gear" data-split-theme="d"> 
    <li><a href="index.html"> 
     <img src="images/album-bb.jpg" /> 
     <h3>Broken Bells</h3> 
     <p>Broken Bells</p> 
    </a><a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">Purchase album</a> 
    </li> 
    <li><a href="index.html"> 

     <img src="images/album-hc.jpg" /> 
     <h3>Warning</h3> 
     <p>Hot Chip</p> 
    </a><a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">Purchase album</a> 
    </li> 
</ul>