Jquery mobile 加上“;“拆分按钮”;在可折叠集中(JQuery Mobile)
是否有任何方法可以将拆分按钮(ListView附带)添加到可折叠列表中;我已经尝试/测试了下面的代码,但不起作用Jquery mobile 加上“;“拆分按钮”;在可折叠集中(JQuery Mobile),jquery-mobile,Jquery Mobile,是否有任何方法可以将拆分按钮(ListView附带)添加到可折叠列表中;我已经尝试/测试了下面的代码,但不起作用 <div data-role="collapsible-set" data-theme="a" data-content-theme="e" data-split-icon="gear" data-split-theme="e"> <div data-role="collapsible"> <h3> Breakfast &
<div data-role="collapsible-set" data-theme="a" data-content-theme="e" data-split-icon="gear" data-split-theme="e">
<div data-role="collapsible">
<h3> Breakfast </h3>
<p>
<a href="somthing.html"> the contents comes here.
</a>
</p>
<a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">
split button 2
</a>
</div>
<div data-role="collapsible">
<h3> Lunch</h3>
<p>
<a href="somthingElse.html"> the contents comes here.
</a>
</p>
<a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">
split button 2
</a>
</div>
</div>
早餐
午餐
任何想法或任何其他解决方案(变通方法)都是非常受欢迎的。好的,它需要一些工作,但这里是我所拥有的 实例:
- (向可折叠文件添加措辞)
-
-
希望这对您有所帮助您能否共享拆分按钮(随ListView提供)的图片,因为我不明白您想做什么?我还尝试在其中添加href图标,如下所示:早餐,但我无法单击图标/图像,它与文本非常接近,而不是与边缘/侧面的拆分按钮一样。Gajotres,图片是gear(data split icon=“gear”),因此您希望在可折叠图标上显示gear图像,而不是加号/减号图像?我添加了一个图标:你能解释更多吗?不,Phill先生,我需要两个图标,一个在左边,另一个在右边。作为Listview上的“拆分按钮”。谢谢Phill,我希望能帮助我设置拆分图标的格式,它不适合。
$(".splitButtonClicked").on("click", function (event, ui) {
alert('Hello');
return false; // stop collapsible event
});
<div data-role="page" id="home">
<div data-role="content">
<div data-role="collapsible-set" data-theme="b" data-content-theme="d">
<div data-role="collapsible">
<h2>
<ul data-role="listview" data-split-icon="gear" data-split-theme="d">
<li><a href="#">
<h3>Breakfast</h3>
</a><a href="#breakfast_menu" data-rel="popup" data-position-to="window" data-transition="pop" class="splitButtonClicked">View Menu</a>
</li>
</ul>
</h2>
</div>
<div data-role="collapsible">
<h2>
<ul data-role="listview" data-split-icon="gear" data-split-theme="d">
<li><a href="#">
<h3>Lunch</h3>
</a><a href="#lunch_menu" data-rel="popup" data-position-to="window" data-transition="pop" class="splitButtonClicked">View Menu</a>
</li>
</ul>
</h2>
</div>
</div>
</div>
</div>