aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarcus Bointon <[email protected]>2012-03-22 21:24:57 +0100
committerMarcus Bointon <[email protected]>2012-03-22 21:24:57 +0100
commit239c178b685294ce24ab79d913c5df03d15191e9 (patch)
tree701602b957904a84792793625c44c693f44c44fc /docs
parentcfce34e3000b2c02549e3af280668afea61fa752 (diff)
downloadbootstrap-239c178b685294ce24ab79d913c5df03d15191e9.tar.xz
bootstrap-239c178b685294ce24ab79d913c5df03d15191e9.zip
Clarify docs on how tabs are activated from JS, see #1000
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/bootstrap.zipbin50100 -> 50100 bytes
-rw-r--r--docs/javascript.html10
-rw-r--r--docs/templates/pages/javascript.mustache10
3 files changed, 14 insertions, 6 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip
index 716a5d509..80e5096df 100644
--- a/docs/assets/bootstrap.zip
+++ b/docs/assets/bootstrap.zip
Binary files differ
diff --git a/docs/javascript.html b/docs/javascript.html
index f2d23ef52..39cb5c5a5 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -636,9 +636,13 @@ $('#myModal').on('hidden', function () {
</div>
<hr>
<h2>Using bootstrap-tab.js</h2>
- <p>Enable tabbable tabs via javascript:</p>
- <pre class="prettyprint linenums">$('#myTab').tab('show')</pre>
- <p>You can select individual tabs in several ways:</p>
+ <p>Enable tabbable tabs via javascript (each tab needs to be activated individually):</p>
+ <pre class="prettyprint linenums">
+$('#myTab a').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+})</pre>
+ <p>You can activate individual tabs in several ways:</p>
<pre class="prettyprint linenums">
$('#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 925377339..c6d1f403c 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -560,9 +560,13 @@ $('#myModal').on('hidden', function () {
</div>
<hr>
<h2>{{_i}}Using bootstrap-tab.js{{/i}}</h2>
- <p>{{_i}}Enable tabbable tabs via javascript:{{/i}}</p>
- <pre class="prettyprint linenums">$('#myTab').tab('show')</pre>
- <p>{{_i}}You can select individual tabs in several ways:{{/i}}</p>
+ <p>{{_i}}Enable tabbable tabs via javascript (each tab needs to be activated individually):{{/i}}</p>
+ <pre class="prettyprint linenums">
+$('#myTab a').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+})</pre>
+ <p>{{_i}}You can activate individual tabs in several ways:{{/i}}</p>
<pre class="prettyprint linenums">
$('#myTab a[href="#profile"]').tab('show'); //Select tab by name
$('#myTab a:first').tab('show'); //Select first tab