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