You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element.
@@ -653,7 +658,7 @@ $('#myModal').on('hidden', function () {
Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the dom.
--
cgit v1.2.3
From 02a67ea59eb8ee28ba4220898c1a0b2052a80915 Mon Sep 17 00:00:00 2001
From: Marcus Bointon
Date: Wed, 21 Mar 2012 11:28:23 +0100
Subject: Add note about styling tabs Fix typo in popover docs
---
docs/javascript.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index 739e2475f..c9b94a3ca 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -644,7 +644,7 @@ $('#myTab a[href="#profile"]').tab('show');
$('#myTab a:last').tab('show');
Markup
-
You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element.
+
You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the bootstrap tab styling.
- For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a the selector option.
+ For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.
Methods
$().popover(options)
--
cgit v1.2.3
From cfce34e3000b2c02549e3af280668afea61fa752 Mon Sep 17 00:00:00 2001
From: Marcus Bointon
Date: Thu, 22 Mar 2012 20:36:49 +0100
Subject: Add more examples for activating tabs Make naming of tab id
consistent
---
docs/javascript.html | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index c9b94a3ca..f2d23ef52 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -609,7 +609,7 @@ $('#myModal').on('hidden', function () {
Example tabs
Click the tabs below to toggle between hidden panes, even via dropdown menus.
@@ -638,10 +638,12 @@ $('#myModal').on('hidden', function () {
Using bootstrap-tab.js
Enable tabbable tabs via javascript:
$('#myTab').tab('show')
-
You can also activate a specific tab (or a pseudo-selected one) on init:
+
You can select individual tabs in several ways:
-$('#myTab a[href="#profile"]').tab('show');
-$('#myTab a:last').tab('show');
+$('#myTab a[href="#profile"]').tab('show'); //Select tab by name
+$('#myTab a:first').tab('show'); //Select first tab
+$('#myTab a:last').tab('show'); //Select last tab
+$('#myTab li:eq(2) a').tab('show'); //Select third tab (0-indexed)
Markup
You can activate a tab or pill navigation without writing any javascript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the bootstrap tab styling.
--
cgit v1.2.3
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):
Overview
--
cgit v1.2.3
From 825227474b57c90181e9c1b43da952d01b6c1dc1 Mon Sep 17 00:00:00 2001
From: Mark Otto
Date: Sun, 25 Mar 2012 17:37:38 -0700
Subject: add refresh method documentation to js docs to close #2028 and #2795
---
docs/javascript.html | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index 3cba210a1..70646afdb 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -571,6 +571,14 @@ $('#myModal').on('hidden', function () {
Heads up!
Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.
+
Methods
+
.scrollspy('refresh')
+
When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:
+
+$('[data-spy="scroll"]').each(function () {
+ var $spy = $(this).scrollspy('refresh')
+});
+
Options
--
cgit v1.2.3
From 5d2062a3ccb0fed4901fc9f312c961d042f569bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Cederstro=CC=88m?=
Date: Tue, 27 Mar 2012 08:36:34 +0200
Subject: Finish of close conversion from a to button
---
docs/javascript.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index 70646afdb..4f777e031 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -208,7 +208,7 @@
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
--
cgit v1.2.3
From 56ecc6ba96550d8e66d0484c21fc20da5f8e52e6 Mon Sep 17 00:00:00 2001
From: Mark Otto
Date: Sat, 31 Mar 2012 12:31:56 -0700
Subject: clarify use of dropdowns, href, and data-target for js docs; add
tests to css tests page for it's display and execution in html
---
docs/javascript.html | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index 4f777e031..2a0f3d861 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -493,6 +493,20 @@ $('#myModal').on('hidden', function () {
</li>
...
</ul>
+
To keep URLs intact, use the data-target attribute instead of href="#".
Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
+
+
updater
+
function
+
updates input with selection
+
Method used to update input contents. Accepts a single argument item and has the scope of the typeahead instance. Should return a string.
+
--
cgit v1.2.3
From 031fa47f68f5655bf68f0c9ebf551f92028bf5d8 Mon Sep 17 00:00:00 2001
From: Nirav Sanghani
Date: Mon, 16 Apr 2012 17:27:34 -0700
Subject: Update new typeahead method docs to be a bit clearer.
---
docs/javascript.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'docs/javascript.html')
diff --git a/docs/javascript.html b/docs/javascript.html
index b6f7ce92e..2261e65b8 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -1493,8 +1493,8 @@ $('.carousel').carousel({
updater
function
-
updates input with selection
-
Method used to update input contents. Accepts a single argument item and has the scope of the typeahead instance. Should return a string.
+
replaces contents of text input with typeahead selection
+
Method used to update contents of text input. Accepts a single argument, the item selected from the typeahead, and has the scope of the typeahead instance. Should return a string.
Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
-
-
updater
-
function
-
replaces contents of text input with typeahead selection
-
Method used to update contents of text input. Accepts a single argument, the item selected from the typeahead, and has the scope of the typeahead instance. Should return a string.