Documentation of various containers
<link rel="stylesheet" href='../../HTWF/css/components.css'> <script src='../../HTWF/scripts/jquery.tab-accordion.js'></script>
<div class="tab-box"> <ul class="nav nav-tabs"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> <div class="panel active"> ... </div> <div class="panel"> .. </div> <div class="panel"> ... </div> </div> <!-- second tab --> <div class="tab-box inverse"> <div class="panel active"> ... </div> <div class="panel"> ... </div> <div class="panel"> ... </div> <ul class="nav nav-tabs"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> </div>
<div class="tab-box"> <ul class="nav nav-tabs nav-justified"> <li class="active"><a href="#"><i class="im-home"></i> Home</a></li> <li><a href="#"><i class="im-speach-bubble5"></i> Profile</a></li> </ul> <div class="panel active"> ... </div> <div class="panel"> ... </div> </div> <!-- second tab --> <div class="tab-box"> <ul class="nav nav-tabs"> <li class="active"><a href="#"><i class="im-home"></i></a></li> <li><a href="#"><i class="im-speach-bubble5"></i></a></li> </ul> <div class="panel active"> ... </div> <div class="panel"> ... </div> </div> <!-- third tab --> <div class="tab-box"> <ul class="nav nav-tabs nav-center"> <li class="active" data-anima="slide-right-left" data-trigger="hover"> <a href="#"><i class="im-home anima"></i> Home</a> </li> <li> <a href="#" data-anima="slide-right-left" data-trigger="hover"><i class="im-speach-bubble5 anima"></i> Profile</a> </li> </ul> <div class="panel active"> ... </div> <div class="panel"> ... </div> </div>
<div class="tab-box pills" data-tab-anima="slide-top-bottom"> <ul class="nav nav-pills nav-justified"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> <div class="panel active"> ... </div> <div class="panel"> ... </div> <div class="panel"> ... </div> </div> <!-- second tab --> <div class="tab-box pills" data-tab-anima="pulse-horizontal"> <ul class="nav nav-pills nav-center"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> <div class="panel active"> ... </div> <div class="panel"> ... </div> <div class="panel"> ... </div> </div>
<div class="tab-box left"> <ul class="nav nav-tabs col-md-4"> <li class="active"><a href="#home">Home</a></li> <li><a href="#profile">Profile</a></li> <li><a href="#messages">Messages</a></li> </ul> <div class="panel-box col-md-8"> <div class="panel active" id="home"> ... </div> <div class="panel" id="profile"> ... </div> <div class="panel" id="messages"> ... </div> </div> </div> <!-- second tab --> <div class="tab-box right"> <div class="panel-box col-md-8"> <div class="panel active"> ... </div> <div class="panel"> ... </div> <div class="panel"> ... </div> </div> <ul class="nav nav-tabs col-md-4"> <li class="active"><a href="#"><i class="im-home"></i> Home</a></li> <li><a href="#"><i class="im-speach-bubble5"></i> Profile</a></li> <li><a href="#"><i class="im-book"></i> Messages</a></li> </ul> </div>
<div class="tab-box left pills" data-tab-anima="fade-right"> <ul class="nav nav-pills col-md-4"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> <div class="panel-box col-md-8"> <div class="panel active" id="home"> ... </div> <div class="panel" id="profile"> ... </div> <div class="panel" id="messages"> ... </div> </div> </div> <!-- second tab --> <div class="tab-box right pills" data-tab-anima="fade-in"> <div class="panel-box col-md-8"> <div class="panel active" id="home"> ... </div> <div class="panel" id="profile"> ... </div> <div class="panel" id="messages"> ... </div> </div> <ul class="nav nav-pills col-md-4"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> </ul> </div>
Name | Type | Description |
---|---|---|
Justified tabs | CSS class |
Add class nav-justified to nav-tabs object. Example: <ul class="nav nav-tabs nav-justified"> ... </ul> .
For vertical tabs add class nav-justified-v to nav-tabs object. Example: <ul class="nav nav-tabs nav-justified-v"> ... </ul> .
|
Left tabs | CSS class |
Add class nav-left to nav-tabs object. Example: <ul class="nav nav-tabs nav-left"> ... </ul> .
|
Centered tabs | CSS class |
Add class nav-center to nav-tabs object. Example: <ul class="nav nav-tabs nav-center"> ... </ul> .
|
Animations | Data attribute |
Add attribute data-tab-anima="animation-name" to tab-box code. Example: <div class="tab-box" data-tab-anima="fade-right"> ... </div> .
Animations list available on animation page
|
Tab pills | CSS class |
Add class nav-pills to nav-tabs object. Example: <ul class="nav nav-pills"> ... </ul> .
|
Target tab | Data attribute |
Default tabs are auto linked to the correct panel, but you can set manual tab opening in this way:
1 ) Set the href of the link of nav-tabs code with ID of panel you want open.
Example: <ul class="nav nav-tabs"><><a href="#ID">Home</a></li></ul> .
2 ) Set the ID of panel. Example: <div class="panel" id="ID"> ... </div> .
Example: <div class="tab-box"> <ul class="nav nav-tabs"> <li><a href="#home">Home</a></li> </ul> <div class="panel" id="home"> ... </div> </div> |
Tab activation | Javascript |
You can activate individual tabs in several ways:
$('#myTabs > .nav-tabs li:first').click() // Select first tab $('#myTabs > .nav-tabs li:last').click() // Select last tab $('#myTabs > .nav-tabs li:eq(1)').click() // Select second tab (0-indexed) |
Nested tabs | Javascript |
Nested vertical justified tabs require a Javascript function before show the nested tab:function initTabAccordion() { setTimeout(function () { startTabAccordion(); }, 300); } function startTabAccordion() { $(".tab-box.left,.tab-box.right").each(function () { var t = $(this).find(".nav"); var p = $(this).find(".panel-box"); if ($(p).outerHeight() < $(t).outerHeight()) $(p).find(".panel").css("height", $(t).outerHeight() + "px"); else $(t).css("height", $(p).find(".panel").outerHeight() + "px"); }); $(".nav.nav-justified-v").each(function () { var count_m = $(this).find("li").length; var a = $(this).find("li a"); $(a).css("height", $(this).outerHeight() / count_m + "px"); $(a).css("line-height", $(a).height() + "px") }); } |
<script src='../../HTWF/scripts/jquery.slimscroll.min.js'></script>
<!-- FIRST SCROLL BOX --> <div class="col-md-6"> <div class="scroll-content" data-height="230"> ... </div> </div> <!-- SECOND SCROLL BOX --> <div class="col-md-6 well" style="max-height:350px"> <div class="scroll-content" data-height=".col-md-6" data-options="alwaysVisible:true, size:7px, color:#337AB7"> ... </div> </div>
Name | Type | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTML initialization | Data attribute |
Add class scroll-content to target object and attribute data-height="123" , replace 123 with height in px.
|
||||||||||||||
Height | Data attribute |
Scroll box's settings are many, the most important is data-height , it's used for set the height of scroll box:
|
||||||||||||||
Mobile disabled | CSS class |
To disable the scroll box only on mobile devies and show all content vertically add class scroll-mobile-disabled to scroll-box object.
Example: <div class="scroll-content scroll-mobile-disabled"> ... </div> .
|
||||||||||||||
Settings | Data attribute |
Most of settings can be passed through data-options attribute: data-options="option-1:value,option-2:value, ..." .
Example: <div class="scroll-content" data-height=".col-md-6" data-options="alwaysVisible:true, size:7px, color:#337AB7"> .
Full options here
|
<link rel="stylesheet" href="../../HTWF/css/components.css"> <script src='../../HTWF/scripts/jquery.tab-accordion.js'></script>
<div class="collapse-box"> <button class="collapse-button btn btn-sm btn-sm dropdown-toggle" type="button"> Open panel - example A <span class="caret"></span> </button> <div class="panel"> <div class="well"> ... </div> </div> </div>
<div class="collapse-box"> <div class="panel"> <div class="well"> ... </div> </div> <button class="collapse-button btn btn-sm btn-sm dropdown-toggle" type="button"> Open panel - example B <span class="caret"></span> </button> </div>
<div class="collapse-box"> <div class="panel"> <div class="well"> ... </div> </div> <button class="collapse-button btn btn-sm btn-sm dropdown-toggle" type="button" data-time="3000" data-height="50"> Open panel - example C <span class="caret"></span> </button> </div>
<div class="collapse-box" data-height="50"> <div class="panel"> ... </div> <div class="text-center;"> <a class="collapse-button" data-button-open-text="Hide all" data-button-close-text="Show all"> <b>Show all</b> <span class="caret"></span> </a> </div> </div>
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
HTML settings | Data attribute |
Collapse settings are 2, data-time and data-height of collapse panel height and open height.
Example: <button class="collapse-button dropdown-toggle" type="button" data-time="3000" data-height="50">Open</button> .
|
||||||||
Javascript initialization | Javascript |
Collapse a panel with function $('#collapse-id .panel').collapse() . Function allow 2 settings, time and height .
Example: $('#collapse-id .panel').collapse({ height: 150, time: 1500 }) .
|
<link rel="stylesheet" href="../../HTWF/css/components.css"> <script src='../../HTWF/scripts/jquery.tab-accordion.js'></script>
<div class="list-group accordion-list"> <div class="list-group-item"> <a href="#"> Accordion item 1</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 2</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 3</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> </div>
<div class="list-group accordion-list" data-type="accordion" data-time="1000"> <div class="list-group-item"> <a href="#"> Accordion item 1</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 2</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 3</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> </div>
<div class="list-group accordion-list" data-type="visible"> <div class="list-group-item"> <a href="#"> Accordion item 1</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 2</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> <div class="list-group-item"> <a href="#"> Accordion item 3</a> <div class="panel"> <div class="inner"> ... </div> </div> </div> </div>
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTML settings | Data attribute |
Accordion settings are 2, data-time and data-type .
Example: <div class="list-group accordion-list" data-time="3000" data-type="visible">...</div> .
|
Illo mus beataeus, dispernatu uerto caldaia mortillos.llam donec rem posuere tempora eveniet nibh perspiciatis cupidatat error per parturient justo.
Illo mus beataeus, dispernatu uerto caldaia mortillos.llam donec rem posuere tempora eveniet nibh perspiciatis cupidatat error per parturient.
Illo mus beataeus, dispernatu uerto caldaia mortillos.llam donec rem posuere tempora eveniet nibh perspiciatis cupidatat error per parturient justo.
<div class="row box-steps"> <div class="step-item col-md-4"> <span class="step-number">1</span> <h3>...</h3> <p> ... </p> </div> <div class="step-item col-md-4"> <span class="step-number">2</span> <h3>...</h3> <p> ... </p> </div> <div class="step-item col-md-4"> <span class="step-number">3</span> <h3>...</h3> <p> ... </p> </div> </div>