From: Marcus Bointon Date: Thu, 22 Mar 2012 20:24:57 +0000 (+0100) Subject: Clarify docs on how tabs are activated from JS, see #1000 X-Git-Tag: v2.0.3~5^2~144^2~1^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2722%2Fhead;p=thirdparty%2Fbootstrap.git Clarify docs on how tabs are activated from JS, see #1000 --- diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 716a5d5099..80e5096dfb 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/javascript.html b/docs/javascript.html index f2d23ef52a..39cb5c5a5e 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -636,9 +636,13 @@ $('#myModal').on('hidden', function () {

Using bootstrap-tab.js

-

Enable tabbable tabs via javascript:

-
$('#myTab').tab('show')
-

You can select individual tabs in several ways:

+

Enable tabbable tabs via javascript (each tab needs to be activated individually):

+
+$('#myTab a').click(function (e) {
+  e.preventDefault();
+  $(this).tab('show');
+})
+

You can activate individual tabs in several ways:

 $('#myTab a[href="#profile"]').tab('show'); //Select tab by name
 $('#myTab a:first').tab('show'); //Select first tab
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache
index 925377339b..c6d1f403c4 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -560,9 +560,13 @@ $('#myModal').on('hidden', function () {
           
           

{{_i}}Using bootstrap-tab.js{{/i}}

-

{{_i}}Enable tabbable tabs via javascript:{{/i}}

-
$('#myTab').tab('show')
-

{{_i}}You can select individual tabs in several ways:{{/i}}

+

{{_i}}Enable tabbable tabs via javascript (each tab needs to be activated individually):{{/i}}

+
+$('#myTab a').click(function (e) {
+  e.preventDefault();
+  $(this).tab('show');
+})
+

{{_i}}You can activate individual tabs in several ways:{{/i}}

 $('#myTab a[href="#profile"]').tab('show'); //Select tab by name
 $('#myTab a:first').tab('show'); //Select first tab