aboutsummaryrefslogtreecommitdiff
path: root/docs/templates/pages/javascript.mustache
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/templates/pages/javascript.mustache
parentcfce34e3000b2c02549e3af280668afea61fa752 (diff)
downloadbootstrap-239c178b685294ce24ab79d913c5df03d15191e9.tar.xz
bootstrap-239c178b685294ce24ab79d913c5df03d15191e9.zip
Clarify docs on how tabs are activated from JS, see #1000
Diffstat (limited to 'docs/templates/pages/javascript.mustache')
-rw-r--r--docs/templates/pages/javascript.mustache10
1 files changed, 7 insertions, 3 deletions
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