# Bootstrap-Multitabs
**Repository Path**: vvull/multi-tabs
## Basic Information
- **Project Name**: Bootstrap-Multitabs
- **Description**: 基于Bootstrap的multitabs | multi-tabs | tabs | tab | 多标签页,可增加,关闭,折叠。智能,快速搭建,多种样式。
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 47
- **Created**: 2021-07-07
- **Last Updated**: 2021-07-07
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# bootstrap-multitabs #
For chinese README.md, please read [简体中文](README_cn.md)
## Screenshot ##
### default (with left/right/option button) ###
Demo: [nav-tabs](https://edwinhuish.github.io/bootstrap-multitabs/demo/index.html) and [nav-pills](https://edwinhuish.github.io/bootstrap-multitabs/demo/index-default-pills.html)

### classic (fold hidden tabs) ###
Demo: [nav-tabs](https://edwinhuish.github.io/bootstrap-multitabs/demo/index-classic.html) and [nav-pills](https://edwinhuish.github.io/bootstrap-multitabs/demo/index-classic-pills.html)

### simple ###
Demo: [nav-tabs](https://edwinhuish.github.io/bootstrap-multitabs/demo/index-simple.html) and [nav-pills](https://edwinhuish.github.io/bootstrap-multitabs/demo/index-simple-pills.html)

## Role and Benefits ##
1. Zero configuration and auto ajax / iframe
2. Can use the templates of bootstrap
3. Can refresh window, and all the tabs will keep same as before.
4. Navigation tab draggable.
5. While ``` maxTabs : 1 ``` or small screen, hide the tab header.
## Requirements ###
1. [Bootstrap](http://getbootstrap.com/)
2. [JQuery](http://jquery.com/)
3. [Font Awesone](http://fontawesome.io/icons/)
## Use ##
1. Add multitabs's CSS in the head
```html
```
2. Add multitabs's JS in the bottom ot body
```html
```
3. Bind the content wrapper
```html
```
4. At last, add "multitabs" class in the link which you want.
```html
ajax INFO Tab 2
```
** Now, the simple bootstrap-multitabs works! **
## Advanced setting ##
### Parameter of link ###
1. ```[data-type="info"]``` content type, can be (main | info), info is the default and the normal one. Main just can be 1 tab.
2. ```[data-iframe="true"]``` iframe mode, default is false. While false, is the auto mode (for the self page, use ajax, and the external, use iframe)
3. ```[data-title="new tab"]``` tab's tittle, if empty or undefined, tab's tittle will be link's text.
4. ```[data-url="index.html"]``` this parameter for the object not link.
5. ```[data-refresh="true"]``` for force refresh
### Initial Configuration ###
The following is the default configuration, you can modify as you want.
```html
```
## Attention for iframe ##
1. For iframe's auto-height, please add CSS as blew to your page. ```.content-wrapper``` is the selector using multitabs. ```.wrapper``` is parent of ```.content-wrapper``` , all parent of wrapper multitabs must add ```height: 100%```
```html
```
2. create tab with iframe's object:
```html
parent.$(parent.document).data('multitabs').create({
iframe : true, //iframe mode, default is false. While false, is the auto mode (for the self page, use ajax, and the external, use iframe)
title : 'open by iframe', //title of tab, if empty, show the URL
url : 'pages/index-2.html' //URL, if it's external link, content type change to 'info'
}, true); //true for active tab
```