|
1 | 1 | Bootstrap Hover Tabs |
2 | 2 | ==================== |
3 | 3 |
|
4 | | -This is a super-simple and lightweight plugin for Bootstrap which allows you to activate tabs on hover. |
| 4 | +This is a super-simple and lightweight plugin for Bootstrap which automatically activates tabs on hover. |
5 | 5 |
|
6 | 6 | **Note:** This plugin is also available via [Bootstrap Plugins](https://github.com/tonystar/bootstrap-plugins) — the ultimate set of must-have plugins for Bootstrap. |
7 | 7 |
|
8 | | -Usage |
9 | | ------ |
| 8 | +Installation |
| 9 | +------------ |
10 | 10 |
|
11 | | -First, add this script somewhere after `bootstrap.js`: |
| 11 | +Link to the script in your code after you include the main Bootstrap JS file(s): |
12 | 12 |
|
13 | 13 | ```html |
| 14 | +<script src="<...>/jquery.min.js"></script> |
| 15 | +<script src="<...>/bootstrap.min.js"></script> |
14 | 16 | <script src="//cdn.rawgit.com/tonystar/bootstrap-hover-tabs/master/bootstrap-hover-tabs.js"></script> |
15 | 17 | ``` |
| 18 | +That's it. No additional configuration required! |
16 | 19 |
|
17 | | -Then, just add `data-hover="tab"` in addition to `data-toggle="tab"` for each tab link. |
18 | | - |
19 | | -Example |
20 | | -------- |
| 20 | +Usage |
| 21 | +----- |
21 | 22 |
|
22 | | -```html |
23 | | -<div> |
24 | | - |
25 | | - <!-- Nav tabs --> |
26 | | - <ul class="nav nav-tabs" role="tablist"> |
27 | | - <li class="active"><a href="#home" data-toggle="tab" data-hover="tab">Home</a></li> |
28 | | - <li><a href="#profile" data-toggle="tab" data-hover="tab">Profile</a></li> |
29 | | - <li><a href="#messages" data-toggle="tab" data-hover="tab">Messages</a></li> |
30 | | - <li><a href="#settings" data-toggle="tab" data-hover="tab">Settings</a></li> |
31 | | - </ul> |
32 | | - |
33 | | - <!-- Tab panes --> |
34 | | - <div class="tab-content"> |
35 | | - <div class="tab-pane active" id="home">...</div> |
36 | | - <div class="tab-pane" id="profile">...</div> |
37 | | - <div class="tab-pane" id="messages">...</div> |
38 | | - <div class="tab-pane" id="settings">...</div> |
39 | | - </div> |
40 | | - |
41 | | -</div> |
42 | | -``` |
| 23 | +No instructions here! Just follow the **Installation** section and you are done! |
43 | 24 |
|
44 | | -## [Docs →](http://bootstrap.tonystar.me/hover-tabs) |
| 25 | +## [Example & Docs →](http://bootstrap.tonystar.me/hover-tabs) |
0 commit comments