Wednesday 6 December 2017

Find Active Tab using jQuery and Twitter Bootstrap

Find Active Tab using jQuery and Twitter Bootstrap

Description:

In this example we explain that how to find Active Tab using jQuery and Twitter Bootstrap. Or how to get the data of the Active Tab in Bootstrap using jQuery. Or how to get the current active tab using JavaScript or jQuery. Or how to get the href value of the active tab inside li list using JavaScript or jQuery. Or how to get the active tab of the css bootstrap tab inside the <ul> and <li> list tab using JavaScript or jQuery.

Code:

<ul class="nav nav-tabs">              
    <!-- Default tab -->
    <li class="active"><a href="#elemLower_tab" data-toggle="tab">Elementary Lower</a></li>
    <li><a href="#elemAdvance_tab" data-toggle="tab">Elementary Advance</a></li>
    <li><a href="#secondary_tab" data-toggle="tab">Secondary</a></li>              
</ul>


    $('.nav-tabs .active').text()



0 comments:

Post a Comment