mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Clarify docs on how tabs are activated from JS, see #1000
This commit is contained in:
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user