I've to add a dropdown menu on a tab of a "JQuery UI tabs", in summary I've a page like:
$( 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>
And when user clicks on "Tab 2", I'd like to show a dropdown menu with two list items ("Tab 2" and a hypothetical "Tab 4").
How can I add a dropdown menu on a JQuery UI tabs? And how can I add an "hidden" additional tab?
Thanks
Update: I'd like to have something like: