JSFiddle - React, Tailwind, and code Playground
by petersendidit
HTML
<script src="https://github.com/petersendidit/jquery-ui/raw/tabs_1.9/ui/jquery.ui.core.js"></script>
<script src="https://github.com/petersendidit/jquery-ui/raw/tabs_1.9/ui/jquery.ui.widget.js"></script>
<script src="https://github.com/petersendidit/jquery-ui/raw/tabs_1.9/ui/jquery.ui.tabs.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<!DOCTYPE html>
<html>
<head><title>Test</title></head>
<body>
<div id="tabPanel">
<ul>
<li><a href="#hello">Hello</a></li>
</ul>
<div id="hello">Demo</div>
</div>
<div>
<p><button id="add">Add tab</button>
There are <span id="tabs">1</span> tabs and <span id="panels">1</span> panels.</p>
<p> this is running jQuery UI code from <a href="https://github.com/petersendidit/jquery-ui/tree/tabs_1.9/" target="_blank">https://github.com/petersendidit/jquery-ui/tree/tabs_1.9/</a>
</div>
</body>
</html>
JavaScript
var panel = $('#tabPanel').tabs({
'add' : function(e, ui)
{
$('#panels').text(panel.children('div').length);
$('#tabs').text(panel.find('> ul > li').length);
}
});
$('#add').click(function()
{
panel.tabs('add', '/ajax_html_echo', 'Test');
});