2011-08-14 60 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>