JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://jquery-ui.googlecode.com/svn/tags/1.8rc2/ui/jquery-ui.js"></script>
<link rel="stylesheet" href="http://jquery-ui.googlecode.com/svn/tags/1.8rc2/themes/base/jquery-ui.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>
<button id="add">Add tab</button>
There are <span id="tabs">1</span> tabs and <span id="panels">1</span> panels.
</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');
});