Thankful to Krajee!
to get more out of us.

Demonstration of setting tabs to load tab pane content via ajax using a specified data-url.

NOTE All the code in the demo examples here use Bootstrap 4.x tabs markup and Bootstrap 4.x CSS & JS. However, the alternate Bootstrap 3.x markup code is also mentioned for each example. Obviously, when using Bootstrap 3.x markup, you need to load instead the Boostrap 3.x CSS & JS on your page.

Tip

Not seeing the updated content on this page! Hard refresh your browser to clean cache for this page (e.g. SHIFT-F5 on Windows Chrome)

Local Initial Data

This is some initial static information. You can click these tabs, to load content via ajax.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.


<!-- Ajax Tabs Above -->
<div class='tabs-x tabs-above tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-above" class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#home-tabs-above" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1">Home</a></li>
        <li><a href="#profile-tabs-above" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2">Profile</a></li>
        <li class="dropdown">
            <a href="#" id="myTabDrop-tabs-above" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-1">
                <li><a href="#dropdown-tabs-above-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3">Option 1</a></li>
                <li><a href="#dropdown-tabs-above-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4">Option 2</a></li>
            </ul>
        </li>
        <li class="disabled"><a href="#disabled-tabs-above"><i class="glyphicon glyphicon-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-above" class="tab-content">
        <div class="tab-pane fade in active" id="home-tabs-above"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-above"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-above-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-above-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-above">Disabled Content</div>
    </div>
</div>

Bootstrap v4.x Code
<!-- Ajax Tabs Above -->
<div class='tabs-x tabs-above tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-above" class="nav nav-tabs" role="tablist">
        <li class="nav-item"><a class="nav-link active" id="home-tab-tabs-above" href="#home-tabs-above" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1" aria-controls="home" aria-expanded="true"><i
                class="fa fa-home"></i> Home</a></li>
        <li class="nav-item"><a class="nav-link" id="profile-tab-tabs-above" href="#profile-tabs-above" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2" aria-controls="profile"><i class="fa fa-user"></i>
            Profile</a></li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="myTabDrop-tabs-above" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i
                    class="fa fa-list-alt"></i> Menu</a>
            <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-tabs-above">
                <a class="dropdown-item" id="dropdown-tab-tabs-above-1" href="#dropdown-tabs-above-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3" aria-controls="dropdown-tabs-above-1">
                    <i class="fa fa-chevron-right"></i> Option 1</a>
                <a class="dropdown-item" id="dropdown-tab-tabs-above-2" href="#dropdown-tabs-above-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4" aria-controls="dropdown-tabs-above-2">
                    <i class="fa fa-chevron-right"></i> Option 2</a>
            </div>
        </li>
        <li class="nav-item"><a class="nav-link disabled" id="disabled-tab-tabs-above" href="#disabled-tabs-above"><i class="fa fa-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-above" class="tab-content">
        <div class="tab-pane fade show active" id="home-tabs-above" role="tabpanel" aria-labelledby="home-tab-tabs-above"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-above" role="tabpanel" aria-labelledby="profile-tabs-above"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-above-1" role="tabpanel" aria-labelledby="dropdown-tab-tabs-above-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-above-2" role="tabpanel" aria-labelledby="dropdown-tab-tabs-above-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-above" role="tabpanel" aria-labelledby="disabled-tab-tabs-above">Disabled Content</div>
    </div>
</div>

Local Initial Data

This is some initial static information. You can click these tabs, to load content via ajax.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.


<!-- Ajax Tabs Below -->
<div class='tabs-x tabs-below tab-bordered tabs-krajee'>
    <div id="myTabContent-tabs-below" class="tab-content">
        <div class="tab-pane fade in active" id="home-tabs-below"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-below"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-below-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-below-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-below">Disabled Content</div>
    </div>
    <ul id="myTab-tabs-below" class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#home-tabs-below" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1">Home</a></li>
        <li><a href="#profile-tabs-below" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2">Profile</a></li>
        <li class="dropdown">
            <a href="#" id="myTabDrop-tabs-below" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-1">
                <li><a href="#dropdown-tabs-below-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3">Option 1</a></li>
                <li><a href="#dropdown-tabs-below-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4">Option 2</a></li>
            </ul>
        </li>
        <li class="disabled"><a href="#disabled-tabs-below"><i class="glyphicon glyphicon-knight"></i> Disabled</a></li>
    </ul>
</div>

Bootstrap v4.x Code
<!-- Ajax Tabs Below -->
<div class='tabs-x tabs-below tab-bordered tabs-krajee'>
    <div id="myTabContent-tabs-below" class="tab-content">
        <div class="tab-pane fade show active" id="home-tabs-below" role="tabpanel" aria-labelledby="home-tab-tabs-below"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-below" role="tabpanel" aria-labelledby="profile-tabs-below"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-below-1" role="tabpanel" aria-labelledby="dropdown-tab-tabs-below-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-below-2" role="tabpanel" aria-labelledby="dropdown-tab-tabs-below-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-below" role="tabpanel" aria-labelledby="disabled-tab-tabs-below">Disabled Content</div>
    </div>
    <ul id="myTab-tabs-below" class="nav nav-tabs" role="tablist">
        <li class="nav-item"><a class="nav-link active" id="home-tab-tabs-below" href="#home-tabs-below" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1" aria-controls="home" aria-expanded="true"><i
                class="fa fa-home"></i> Home</a></li>
        <li class="nav-item"><a class="nav-link" id="profile-tab-tabs-below" href="#profile-tabs-below" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2" aria-controls="profile"><i class="fa fa-user"></i>
            Profile</a></li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="myTabDrop-tabs-below" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i
                    class="fa fa-list-alt"></i> Menu</a>
            <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-tabs-below">
                <a class="dropdown-item" id="dropdown-tab-tabs-below-1" href="#dropdown-tabs-below-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3" aria-controls="dropdown-tabs-below-1">
                    <i class="fa fa-chevron-right"></i> Option 1</a>
                <a class="dropdown-item" id="dropdown-tab-tabs-below-2" href="#dropdown-tabs-below-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4" aria-controls="dropdown-tabs-below-2">
                    <i class="fa fa-chevron-right"></i> Option 2</a>
            </div>
        </li>
        <li class="nav-item"><a class="nav-link disabled" id="disabled-tab-tabs-below" href="#disabled-tabs-below"><i class="fa fa-knight"></i> Disabled</a></li>
    </ul>
</div>

Local Initial Data

This is some initial static information. You can click these tabs, to load content via ajax.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.


<!-- Ajax Tabs Left -->
<div class='tabs-x tabs-left tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-left" class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#home-tabs-left" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1">Home</a></li>
        <li><a href="#profile-tabs-left" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2">Profile</a></li>
        <li class="dropdown">
            <a href="#" id="myTabDrop-tabs-left" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-1">
                <li><a href="#dropdown-tabs-left-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3">Option 1</a></li>
                <li><a href="#dropdown-tabs-left-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4">Option 2</a></li>
            </ul>
        </li>
        <li class="disabled"><a href="#disabled-tabs-left"><i class="glyphicon glyphicon-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-left" class="tab-content">
        <div class="tab-pane fade in active" id="home-tabs-left"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-left"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-left-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-left-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-left">Disabled Content</div>
    </div>
</div>

Bootstrap v4.x Code
<!-- Ajax Tabs Left -->
<div class='tabs-x tabs-left tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-left" class="nav nav-tabs" role="tablist">
        <li class="nav-item"><a class="nav-link active" id="home-tab-tabs-left" href="#home-tabs-left" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1" aria-controls="home" aria-expanded="true"><i
                class="fa fa-home"></i> Home</a></li>
        <li class="nav-item"><a class="nav-link" id="profile-tab-tabs-left" href="#profile-tabs-left" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2" aria-controls="profile"><i class="fa fa-user"></i>
            Profile</a></li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="myTabDrop-tabs-left" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i
                    class="fa fa-list-alt"></i> Menu</a>
            <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-tabs-left">
                <a class="dropdown-item" id="dropdown-tab-tabs-left-1" href="#dropdown-tabs-left-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3" aria-controls="dropdown-tabs-left-1">
                    <i class="fa fa-chevron-right"></i> Option 1</a>
                <a class="dropdown-item" id="dropdown-tab-tabs-left-2" href="#dropdown-tabs-left-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4" aria-controls="dropdown-tabs-left-2">
                    <i class="fa fa-chevron-right"></i> Option 2</a>
            </div>
        </li>
        <li class="nav-item"><a class="nav-link disabled" id="disabled-tab-tabs-left" href="#disabled-tabs-left"><i class="fa fa-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-left" class="tab-content">
        <div class="tab-pane fade show active" id="home-tabs-left" role="tabpanel" aria-labelledby="home-tab-tabs-left"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-left" role="tabpanel" aria-labelledby="profile-tabs-left"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-left-1" role="tabpanel" aria-labelledby="dropdown-tab-tabs-left-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-left-2" role="tabpanel" aria-labelledby="dropdown-tab-tabs-left-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-left" role="tabpanel" aria-labelledby="disabled-tab-tabs-left">Disabled Content</div>
    </div>
</div>

Local Initial Data

This is some initial static information. You can click these tabs, to load content via ajax.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.


<!-- Ajax Tabs Right -->
<div class='tabs-x tabs-right tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-right" class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#home-tabs-right" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1">Home</a></li>
        <li><a href="#profile-tabs-right" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2">Profile</a></li>
        <li class="dropdown">
            <a href="#" id="myTabDrop-tabs-right" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-1">
                <li><a href="#dropdown-tabs-right-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3">Option 1</a></li>
                <li><a href="#dropdown-tabs-right-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4">Option 2</a></li>
            </ul>
        </li>
        <li class="disabled"><a href="#disabled-tabs-right"><i class="glyphicon glyphicon-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-right" class="tab-content">
        <div class="tab-pane fade in active" id="home-tabs-right"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-right"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-right-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-right-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-right">Disabled Content</div>
    </div>
</div>

Bootstrap v4.x Code
<!-- Ajax Tabs Right -->
<div class='tabs-x tabs-right tab-bordered tabs-krajee'>
    <ul id="myTab-tabs-right" class="nav nav-tabs" role="tablist">
        <li class="nav-item"><a class="nav-link active" id="home-tab-tabs-right" href="#home-tabs-right" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=1" aria-controls="home" aria-expanded="true"><i
                class="fa fa-home"></i> Home</a></li>
        <li class="nav-item"><a class="nav-link" id="profile-tab-tabs-right" href="#profile-tabs-right" role="tab-kv" data-toggle="tab" data-url="/site/fetch-tab?tab=2" aria-controls="profile"><i class="fa fa-user"></i>
            Profile</a></li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="myTabDrop-tabs-right" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i
                    class="fa fa-list-alt"></i> Menu</a>
            <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop-tabs-right">
                <a class="dropdown-item" id="dropdown-tab-tabs-right-1" href="#dropdown-tabs-right-1" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=3" aria-controls="dropdown-tabs-right-1">
                    <i class="fa fa-chevron-right"></i> Option 1</a>
                <a class="dropdown-item" id="dropdown-tab-tabs-right-2" href="#dropdown-tabs-right-2" tabindex="-1" role="tab" data-toggle="tab" data-url="/site/fetch-tab?tab=4" aria-controls="dropdown-tabs-right-2">
                    <i class="fa fa-chevron-right"></i> Option 2</a>
            </div>
        </li>
        <li class="nav-item"><a class="nav-link disabled" id="disabled-tab-tabs-right" href="#disabled-tabs-right"><i class="fa fa-knight"></i> Disabled</a></li>
    </ul>
    <div id="myTabContent-tabs-right" class="tab-content">
        <div class="tab-pane fade show active" id="home-tabs-right" role="tabpanel" aria-labelledby="home-tab-tabs-right"><p>...</p></div>
        <div class="tab-pane fade" id="profile-tabs-right" role="tabpanel" aria-labelledby="profile-tabs-right"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-right-1" role="tabpanel" aria-labelledby="dropdown-tab-tabs-right-1"><p>...</p></div>
        <div class="tab-pane fade" id="dropdown-tabs-right-2" role="tabpanel" aria-labelledby="dropdown-tab-tabs-right-2"><p>...</p></div>
        <div class="tab-pane fade" id="disabled-tabs-right" role="tabpanel" aria-labelledby="disabled-tab-tabs-right">Disabled Content</div>
    </div>
</div>

Note

You can now visit the Krajee Webtips Q & A forum for searching OR asking questions OR helping programmers with answers on these extensions and plugins. For asking a question click here. Select the appropriate question category (i.e. Krajee Plugins) and choose this current page plugin in the question related to field.

The comments and discussion section below are intended for generic discussions or feedback for this plugin. Developers may not be able to search or lookup here specific questions or tips on usage for this plugin.