tab ui question and help

tab ui question and help


Hello everyone
I have to tab systems to control the same divs on the page, I am
trying to tie both tabs together so when I click lets say the second
tab from the first tabs group, the second tab from the second group
will also change,
This is what I got so far
var $tabs = $('#tabs').tabs({ select: function (e, ui) {$
('#second').tabs({ selected: ui.index }); } });
This is my html
<div class="demo">
<div id="tabs">
<ul>
<li>Nunc tincidunt</li>
<li>Proin dolor</li>
<li>Aenean lacinia</li>
</ul>
<div id="tabs-1">

Proin elit arcu, rutrum lorem.


</div>
<div id="tabs-2">

Morbi tincidunt, dui sit amet metus id nunc.


</div>
<div id="tabs-3">

Mauris eleifend est et turpis. Duis id erat.


</div>
<div id="second">
<ul>
<li>Nunc tincidunt</li>
<li>Proin dolor</li>
<li>Aenean lacinia</li>
</ul>
</div>
</div>
</div><!-- End demo -->