Jaxel
Well-known member
I am using XenForo's built in Tab javascript:
By default, the first tab is selected. Would it be possible for me to set the second tab as selected? I know I can re-arrange the order of the tabs, but I want the order to be in a specific way.
I thought it would have been as simple as adding class="active" to the second tab; but that doesn't work. The javascript removes the class and adds it to the first tab.
Code:
<ul class="tabs mainTabs Tabs" data-panes="#tabPanes > li">
<li><a href="{$requestPaths.requestUri}#tab1">tab1</a></li>
<li><a href="{$requestPaths.requestUri}#tab2">tab2<a/></li>
</ul>
<ul id="tabPanes">
<li id="tab1">Stuff</li>
<li id="tab2">More...</li>
</ul>
By default, the first tab is selected. Would it be possible for me to set the second tab as selected? I know I can re-arrange the order of the tabs, but I want the order to be in a specific way.
I thought it would have been as simple as adding class="active" to the second tab; but that doesn't work. The javascript removes the class and adds it to the first tab.
Last edited: