R
ragtek
Guest
XenForo provides a easy to use js Class, to create own tabs.
You have to create a List with the tabs and add the class "Tabs tabs" to it.
There's also a data-panes attribute necessary, where you define the "content container"
As you see, my data-panes are the li elements in the ragtek container.
Because we used the global Tab class, xenforo knows automatic, that we want a tab here.
You could use own classes, but then you have to register them to the tabs class.
You have to create a List with the tabs and add the class "Tabs tabs" to it.
There's also a data-panes attribute necessary, where you define the "content container"
Code:
<ul id="ragtektabs" class="Tabs tabs" data-panes="#ragtek > li">
Code:
<ul id="ragtektabs" class="Tabs tabs" data-panes="#ragtek > li">
<li>
<a href="foo">Tab1</a>
</li>
<li>
<a href="foo2">Tab2</a>
</li>
<li>
<a href="foo3">Tab3a>
</li>
</ul>
<ul id="ragtek">
<li>element1</li>
<li>elemen2</li>
<li>element3</li>
</ul>
Because we used the global Tab class, xenforo knows automatic, that we want a tab here.
You could use own classes, but then you have to register them to the tabs class.
Code:
<script type="text/javascript">
$(function()
{
this.tabs = new XenForo.Tabs($(myTabs)));
}
</script>