diff options
| author | Marcus Bointon <[email protected]> | 2012-03-22 21:24:57 +0100 |
|---|---|---|
| committer | Marcus Bointon <[email protected]> | 2012-03-22 21:24:57 +0100 |
| commit | 239c178b685294ce24ab79d913c5df03d15191e9 (patch) | |
| tree | 701602b957904a84792793625c44c693f44c44fc /docs/javascript.html | |
| parent | cfce34e3000b2c02549e3af280668afea61fa752 (diff) | |
| download | bootstrap-239c178b685294ce24ab79d913c5df03d15191e9.tar.xz bootstrap-239c178b685294ce24ab79d913c5df03d15191e9.zip | |
Clarify docs on how tabs are activated from JS, see #1000
Diffstat (limited to 'docs/javascript.html')
| -rw-r--r-- | docs/javascript.html | 10 |
1 files changed, 7 insertions, 3 deletions
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 |
