diff --git a/docs/_includes/js/tabs.html b/docs/_includes/js/tabs.html
index b107ca6a22..8c4c3c08ff 100644
--- a/docs/_includes/js/tabs.html
+++ b/docs/_includes/js/tabs.html
@@ -4,7 +4,7 @@
Example tabs
Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.
-
+
- Home
- Profile
-
@@ -41,7 +41,7 @@
Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
{% highlight js %}
-$('#myTab a').click(function (e) {
+$('#myTabs a').click(function (e) {
e.preventDefault()
$(this).tab('show')
})
@@ -50,10 +50,10 @@ $('#myTab a').click(function (e) {
You can activate individual tabs in several ways:
{% highlight js %}
-$('#myTab a[href="#profile"]').tab('show') // Select tab by name
-$('#myTab a:first').tab('show') // Select first tab
-$('#myTab a:last').tab('show') // Select last tab
-$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
+$('#myTabs a[href="#profile"]').tab('show') // Select tab by name
+$('#myTabs a:first').tab('show') // Select first tab
+$('#myTabs a:last').tab('show') // Select last tab
+$('#myTabs li:eq(2) a').tab('show') // Select third tab (0-indexed)
{% endhighlight %}
Markup
@@ -94,29 +94,12 @@ $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
Methods
$().tab
- Activates a tab element and content container. Tab should have either a data-target
or an href
targeting a container node in the DOM.
+ Activates a tab element and content container. Tab should have either a data-target
or an href
targeting a container node in the DOM. In the above examples, the tabs are the <a>
s with data-toggle="tab"
attributes.
-{% highlight html %}
-
-
-
...
-
...
-
...
-
...
-
-
-
-{% endhighlight %}
+ .tab('show')
+ Selects the given tab and shows its associated content. Any other tab that was previously selected becomes unselected and its associated content is hidden.
+ {% highlight js %}$('#someTab').tab('show'){% endhighlight %}
Events
When showing a new tab, the events fire in the following order: