Documentation
You can have beautiful, clean and organized content using your favorite skin and transition effect.
skinableTabs is the easy to use, simple, powerful and flexible solution for your tabbed content.
The default tab shown is the first one in the list, if you have not assigned "tab_selected" to any other tab header.
The content will load only once, when the tab is selected.
skinableTabs is the easy to use, simple, powerful and flexible solution for your tabbed content.
HTML structure
The HTML is composed of a parent element and two main parts:- the Navigation
- the Content
<div class="tabs_holder">
... tabs go here ...
</div><!-- /.tabs_holder -->
Navigation
The navigation is organized in the form of an unordered list, with links pointing to the tab content anchors:<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li class="tab_selected"><a href="#tabs-3">Aenean lacinia</a></li>
<li"><a href="#tabs-4" rel="ajax_content.html">Ajax content</a></li>
</ul>
Content
Each header link has a corresponding tab content, matched by it's ID:<div class="content_holder">
<div id="tabs-1">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-1 -->
<div id="tabs-2">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-2 -->
<div id="tabs-3">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-3 -->
</div><!-- /.content_holder -->
Selecting a tab
The class "tab_selected" makes the tab open by default at loading time.The default tab shown is the first one in the list, if you have not assigned "tab_selected" to any other tab header.
<li class="tab_selected"><a href="#tabs-3">Aenean lacinia</a></li>
Loading content via ajax
To load the tab content from an ajax location, just insert the "rel" attribute to a header link, pointing to the ajax location:The content will load only once, when the tab is selected.
<li><a href="#demo-tab-with-ajax" rel="ajax_location.html">Aenean lacinia</a></li>
<div id="demo-tab-with-ajax">
<p>Please wait while the content is loading. [This text will be replaced by the contents of "ajax_location.html"] </p>
</div><!-- /#tabs-1 -->
Defining a tab location
The content is organized with a main parent element and a content holder for each of the tabs. Make sure that the navigation link points to the exact id of the tab content element. For example, on the navigation link, a navigation link:<a href="#tabs-1">Nunc tincidunt</a>
<div id="tabs-1">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-1 -->
<a href="#tabs-1">Nunc tincidunt</a>
<div class="content_holder">
<div id="tabs-1">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-1 -->
<div id="tabs-2">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-2 -->
<div id="tabs-3">
<p>Cras ut odio non odio auctor aliquam quis in sem. </p>
</div><!-- /#tabs-3 -->
</div><!-- /.content_holder -->
Javascript includes
In order to use the skinableTabs plugin you first need to include the jQuery javascript library. You can do so by downloading it or by linking to the Google API:<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
<script type="text/javascript" src="skinableTabs.js"></script>
Plugin usage
<script type="text/javascript">
$('.tabs_holder').skinableTabs({
effect: 'basic_display',
skin: 'skin1',
position: 'top',
skin_path: '../'
});
</script>
Effect
choose one of the built-in 18 show-hide transition effects. Possible values:- basic_display
- simple_fade
- hide_and_seek
- evanescence
- transfading_down
- transfading_up
- overlapping
- slide_right
- slide_left
- slide_up
- fade_slide_left
- fade_slide_right
- fade_slide_up
- fade_slide_down
- horizontal_bouncer
- vertical_bouncer
- fireworks
- puff
Skin
choose one of the 12 fully-featured skins. Possible values:- skin1
- skin2
- skin3
- skin4
- skin5
- skin6
- skin7
- skin8
- skin9
- skin10
- skin11
- skin12
Position
choose the position of the navigation links. Possible values:- top
- right
- bottom
- left
Skin path
skin_path is used for the script to load the skins. Use this if the skins folder is in a different location than the page using the script. Usually, this path is the same as the script include path:<script type="text/javascript" src="../skinableTabs.js"></script>
<script type="text/javascript">
$('.tabs_holder').skinableTabs({
effect: 'basic_display',
skin: 'skin1',
position: 'top',
skin_path: '../'
});
</script>