Working with Nav Tabs in Bootstrap3

Bootstrap Nav Tabs
This quick block post is for those who want to know how bootstrap nav tabs work and how to associate them with respective data blocks.

<ul class="nav nav-tabs">
    <li><a href="#home" data-toggle="tab">Home</a></li>
    <li><a href="#profile" data-toggle="tab">Profile</a></li>
    <li><a href="#messages" data-toggle="tab">Messages</a></li>
<div class="tab-content" id="tabs">
    <div class="tab-pane" id="home"> Sample Content for Home </div>
    <div class="tab-pane" id="profile"> Sample Content for Profile </div>
    <div class="tab-pane" id="messages"> Sample Content for Messages </div>


    function activaTab(tab){
        $('.nav-tabs a[href="#' + tab + '"]').tab('show');


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s