####PWS Tabs is a lightweight jQuery tabs plugin to create responsive flat style tabbed content panels with some cool transition effects powered by CSS3 animations.
npm install pwstabs####PWS Tabs is a lightweight jQuery tabs plugin to create responsive flat style tabbed content panels with some cool transition effects powered by CSS3 animations.
##PWS Tabs is Responsive
$ bower install pwstabs
Online demo: http://alexchizhov.com/pwstabs
1) Include jQuery library and jQuery PWS Tabs plugin in the section.
``html
`
2) Create tabbed panels and use HTML5 data-pws-* attributes to specify the ID & Name for the tabs.
` html`Our first tab
Our second tab
Our third tab
data-pws-tab is used to initiate the tab and as its ID.
data-pws-tab-name is used for a tab display name.
3) Call the plugin on the parent element to create a basic tabs interface with 100% width and 'scale' transition effect.
`js`
jQuery(document).ready(function($){
$('.hello_world').pwstabs();
});
4) Available parameters to customize the tabs plugin.
`js
jQuery(document).ready(function($){
$('.hello_world').pwstabs({
// scale / slideleft / slideright / slidetop / slidedown / none
effect: 'scale',
// The tab to be opened by default
defaultTab: 1,
// Set custom container width
// Any size value (1,2,3.. / px,pt,em,%,cm..)
containerWidth: '100%',
// Tabs position: horizontal / vertical
tabsPosition: 'horizontal',
// Tabs horizontal position: top / bottom
horizontalPosition: 'top',
// Tabs vertical position: left / right
verticalPosition: 'left',
// BETA: Make tabs container responsive: true / false (!!! BETA)
responsive: false,
// Themes available: default: '' / pws_theme_violet / pws_theme_green / pws_theme_yellow
// pws_theme_gold / pws_theme_orange / pws_theme_red / pws_theme_purple / pws_theme_grey
theme: '',
// Right to left support: true/ false
rtl: false
});
});
`
5) PWS Tabs Plugin supports Font Awesome 4.5.0
5.1) Include Font Awesome stylesheet from assets directory:
`html`
5.2) Use HTML5 data-pws-tab-icon attribute to set an icon. Icon names you can find here: Font Awesome Icons.
`html``Our first tab;Our second tabOur third tab
| Option | Default | Description | Available options | Type |
|---|---|---|---|---|
| effect | scale | Transition effect | scale / slideleft / slideright / slidetop / slidedown / none | string |
| defaultTab | 1 | Which tab is chosen by default | Tab ID number starts with 1 (1,2,3..) | number |
| containerWidth | 100% | Tabs container width | Any size value (1,2,3.. / px,pt,em,%,cm..) | string |
| tabsPosition | horizontal | Define tabs position | horizontal / vertical | string |
| horizontalPosition | top | Define Horizontal tabs position | top / bottom | string |
| verticalPosition | left | Define Vertical tabs position | left / right | string |
| theme | '' | Change tabs theme | pws_theme_violet / pws_theme_green pws_theme_yellow / pws_theme_gold pws_theme_orange / pws_theme_red pws_theme_purple / pws_theme_grey pws_theme_dark_violet / pws_theme_dark_green pws_theme_dark_yellow / pws_theme_dark_gold pws_theme_dark_orange / pws_theme_dark_red pws_theme_dark_purple / pws_theme_dark_grey | string |
| responsive | false | !!BETA!! Make tabs responsive | true / false | boolean |
| rtl | false | Right to left support | true / false | boolean |