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 Comment

Your email address will not be published. Required fields are marked *