Tuesday, 13 August 2013

jQuery UI .tabs() Contentless tab?

jQuery UI .tabs() Contentless tab?

I want to have a set of tabs. In each tab header, there is a piece of text
and a button that removes the tab it belonds to on click. And after the
tab headers (<li>), i would like to have an extra button that creates a
new tab on click. For example :
<div class="TabSet">
<ul>
<li><a href="#tabContent0">TEXT<button
class="RemTab">x</button></a></li>
<li><a href="#tabContent1">TEXT<button
class="RemTab">x</button></a></li>
<li><a href="#tabContent2">TEXT<button
class="RemTab">x</button></a></li>
<li><button class="AddTab">+</button></li>
</ul>
<div id="tabContent0">CONTENT</div>
<div id="tabContent1">CONTENT</div>
<div id="tabContent2">CONTENT</div>
</div>
Does jQueryUI .tabs() work if i have more <li> elements than <div>
elements ? If not, is there a clear work around ?
Thanks for your help.

No comments:

Post a Comment