https://github.com/babakfp/easy-tab
Easily create tab navigations
https://github.com/babakfp/easy-tab
tab-navigation taby
Last synced: over 1 year ago
JSON representation
Easily create tab navigations
- Host: GitHub
- URL: https://github.com/babakfp/easy-tab
- Owner: babakfp
- License: gpl-3.0
- Created: 2020-03-12T23:28:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-21T20:51:14.000Z (over 4 years ago)
- Last Synced: 2025-01-22T10:13:04.960Z (over 1 year ago)
- Topics: tab-navigation, taby
- Language: JavaScript
- Homepage:
- Size: 920 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easy Tab
Easily create tab navigations.
## Production files
Path: `/dist`
- `/dist/easytab-dist.js`
- `/dist/easytab-dist.css`
## Usage
```js
new EasyTab(container, activeIndex = 1)
```
```html
Tab 1
Tab 2
Content 1
Content 2
new EasyTab('.my-easytab')
// Or
// new EasyTab(document.querySelector('.my-easytab'))
```
Multiple instances with one line of code
```html
const allEasytabs = document.querySelectorAll('.my-easytab')
allEasytabs.forEach(el => new EasyTab(el))
```