<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div>
</div>
</div><!-- /example -->
</div>
<divclass="bs-callout bs-callout-info">
<divclass="bs-callout bs-callout-info">
<h4>Extends tabbed navigation</h4>
<h4>Extends tabbed navigation</h4>
<p>This plugin extends the <ahref="../components/#nav-tabs">tabbed navigation component</a> to add tabbable areas.</p>
<p>This plugin extends the <ahref="../components/#nav-tabs">tabbed navigation component</a> to add tabbable areas.</p>
</div>
</div>
## Usage
<h2id="tabs-usage">Usage</h2>
Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
<p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>
<p>You can activate individual tabs in several ways:</p>
You can activate individual tabs in several ways:
{% highlight js %}
{% highlight js %}
$('#myTab a[href="#profile"]').tab('show') // Select tab by name
$('#myTab a[href="#profile"]').tab('show') // Select tab by name
...
@@ -61,8 +60,10 @@ $('#myTab a:last').tab('show') // Select last tab
...
@@ -61,8 +60,10 @@ $('#myTab a:last').tab('show') // Select last tab
$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
{% endhighlight %}
{% endhighlight %}
<h3>Markup</h3>
### Markup
<p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap <ahref="../components/#nav-tabs">tab styling</a>, while adding the <code>nav</code> and <code>nav-pills</code> classes will apply <ahref="../components/#nav-pills">pill styling</a>.</p>
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 <ahref="../components/#nav-tabs">tab styling</a>, while adding the `.nav` and `.nav-pills` classes will apply <ahref="../components/#nav-pills">pill styling</a>.
<p>To make tabs fade in, add <code>.fade</code> to each <code>.tab-pane</code>. The first tab pane must also have <code>.in</code> to properly fade in initial content.</p>
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 %}
{% highlight html %}
<div class="tab-content">
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade in active" id="home">...</div>
<div role="tabpanel" class="tab-pane fade in active" id="home">...</div>
Activates a tab element and content container. Tab should have either a <code>data-target</code> or an <code>href</code> targeting a container node in the DOM.
</p>
Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM.