Illustrating how to display an element containing tabs, the jQuery tab documentation offers the following example:
$('#example').tabs();
I needed to have multiple instances of tabs on my page, so I modified the example to:
$('.example', parentEl).tabs();
The parent element will always contain only one instance of the tabs element, so this modification works as expected. However, each tab's content requires an ID attribute:
<div class="tabs">
<ul>
<li><a href="#One" class="TabLink"><span>One</span></a></li>
<li><a href="#Two" class="TabLink"><span>Two</span></a></li>
</ul>
<div id="One"></div>
<div id="Two"></div>
</div>
Considering that I will be generating multiple tabs from a user event, would it be advisable not to use an ID for each tab?