Tabs

Use the tab JavaScript plugin—include it individually or through the compiled bootstrap.js file—to extend our navigational tabs and pills to create tabbable panes of local content, even via dropdown menus.

Via JavaScript

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

                                    
$('#myTab a').on('click', function (e) {
    e.preventDefault();
    $(this).tab('show');
})
                                    
                                

You can activate individual tabs in several ways:

                                        
$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
$('#myTab li:first-child a').tab('show'); // Select first tab
$('#myTab li:last-child a').tab('show'); // Select last tab
$('#myTab li:nth-child(3) a').tab('show'); // Select third tab
                                        
                                    
Methods

For more information, see the official Bootstrap documentation.