About
Formatting Tab is an HTML format for displaying content with a Tab system - (Demo).
Specification
Configuration
Description
initial-opened
Sets the Tab Item that will be opened in initial state. The value can be the Tab Title or Tab Order.
Usage
-
Define HTML with the following format:
<div class='w-tab'> <div title='TAB TITLE 1'> TAB 1 Content... </div> <div title='TAB TITLE 2'> TAB 2 Content... </div> </div>
TAB 1 Content...TAB 2 Content...- Tab Item (element with title attribute) must use the DIV tag.
- The title attribute on the tab item is mandatory.
- In the HTML above, no configurations have been added. All configurations will take Default Values.
-
Add the desired configuration by adding the attribute
data-configuration-name='Value' to the element with the class w-tab.
Example:<div class='w-tab' data-box='shadow'> <div title='TAB TITLE 1'> TAB 1 Content... </div> <div title='TAB TITLE 2'> TAB 2 Content... </div> </div>
TAB 1 Content...TAB 2 Content...
-
Configuration initial-opened
This configuration value can be Title or Order of the Tab Item.
Example based on title:<div class='w-tab' data-initial-opened='TAB TITLE 2' data-box='border'> <div title='TAB TITLE 1'> TAB 1 Content... </div> <div title='TAB TITLE 2'> TAB 2 Content... </div> </div>
TAB 1 Content...TAB 2 Content...
Example based on order:<div class='w-tab' data-initial-opened='2' data-box='border'> <div title='TAB TITLE 1'> TAB 1 Content... </div> <div title='TAB TITLE 2'> TAB 2 Content... </div> </div>
TAB 1 Content...TAB 2 Content...