From 1445e09b5fcd8112e9753aa47c6df9c558782dd5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 27 Aug 2013 08:05:26 -0700 Subject: [PATCH] Fixes #9991: Better docs for tabbable tabs and fade classes * Adds full code snippets * Adds snippet for `.fade` * Adds callout for `.in` requirement on first fade-able tab --- javascript.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/javascript.html b/javascript.html index bb08a95565..6cebde638a 100644 --- a/javascript.html +++ b/javascript.html @@ -708,15 +708,33 @@ $('#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.

{% highlight html %} + + + +
+
...
+
...
+
...
+
...
+
{% endhighlight %} -

To make tabs fade in, add .fade to each .tab-pane.

+

Fade effect

+

To make tabs fade in, add .fade to each .tab-pane. The first tab pane must also have .in to properly fade in initial content.

+{% highlight html %} +
+
...
+
...
+
...
+
...
+
+{% endhighlight %}

Methods

$().tab

-- 2.47.2