Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
Tabber is a jQuery plugin for adding simple tabbed interfaces.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.fs.tabber.js"></script> <link href="jquery.fs.tabber.css" rel="stylesheet">
2. HTML
<div class="tabbed"> <menu class="tabber-menu"> <a href="#tab-1" class="tabber-handle">Tab 1</a> <a href="#tab-2" class="tabber-handle">Tab 2</a> <a href="#tab-3" class="tabber-handle">Tab 3</a> </menu> <div class="tabber-tab" id="tab-1"> Content... </div> <div class="tabber-tab" id="tab-2"> Content... </div> <div class="tabber-tab" id="tab-3"> Content... </div> </div>
3. JAVASCRIPT
$(".tabbed").tabber();
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
customClass | string | '' | Class applied to instance |
maxWidth | string | '980px' | Width at which to auto-disable mobile styles |
vertical | boolean | false | Flag to draw vertical tab set |
5. METHODS
Methods are publicly available to all active instances, unless otherwise stated.
defaults
Sets default plugin options
$.tabber("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |
destroy
Removes instance of plugin
$(".target").tabber("destroy");
select
Activates the specified tab
$(".target").tabber("select", 1);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
index | int | Index to activate |