gpt4 book ai didi

jquery-mobile - 在可折叠集中添加 "Split button"(JQuery Mobile)

转载 作者:行者123 更新时间:2023-12-02 00:13:08 25 4
gpt4 key购买 nike

有没有什么方法可以将拆分按钮(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 </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>

非常欢迎任何想法或任何其他解决方案(解决方法)。

最佳答案

好吧,它需要一些工作,但这是我所拥有的

实例:

JS

$(".splitButtonClicked").on("click", function (event, ui) {
alert('Hello');
return false; // stop collapsible event
});

HTML

<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>

希望对你有帮助

关于jquery-mobile - 在可折叠集中添加 "Split button"(JQuery Mobile),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14501678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com