From 239c178b685294ce24ab79d913c5df03d15191e9 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Thu, 22 Mar 2012 21:24:57 +0100 Subject: Clarify docs on how tabs are activated from JS, see #1000 --- docs/javascript.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'docs/javascript.html') 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 () {

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
-- 
cgit v1.2.3