我已經添加一個「JQuery的UI選項卡」的選項卡上的下拉菜單,總之我有一個頁面,如:jQuery的UI選項卡中添加下拉菜單
$(function() {
$("#tabs").tabs();
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Tab 1</a></li>
<li><a href="#tabs-2">Tab 2</a></li>
<li><a href="#tabs-3">Tab 3</a></li>
</ul>
<div id="tabs-1">
<p>Content of tab 1.</p>
</div>
<div id="tabs-2">
<p>Content of tab 2.</p>
</div>
<div id="tabs-3">
<p>Content of tab 3.</p>
</div>
</div>
當用戶點擊「標籤2」時,我想顯示一個包含兩個列表項(「標籤2」和一個假設的「標籤4」)的下拉菜單。
如何在JQuery UI選項卡上添加下拉菜單?我怎樣才能添加一個「隱藏的」附加標籤?
感謝
更新: 我想有這樣的:
只是說,但也許這不是最好的UI方法,因爲您正在同一級別的另一個元素內的菜單內顯示新元素。對於你的一些用戶來說,這可能會讓你感到困惑,也許你應該重新設計界面,將tab2和tab4分組在同一個標籤頁中或者類似的東西 – Bardo