WordPress.org

Ready to get started?Download WordPress

Forums

WP Bootstrap Tabs
.active class not removed from inactive tabs (5 posts)

  1. joshuaiz
    Member
    Posted 8 months ago #

    Just installed the plugin as well as the bootstrap css + js. When I click on a new tab the .active class is not being removed from the inactive tab(s).

    So, once you click all the tabs (I have 5 on my test page), they all continue to have the .active class although the most recently clicked tab is in the front.

    How can I fix this?

    http://wordpress.org/plugins/wp-bootstrap-tabs/

  2. Virtus Designs
    Member
    Plugin Author

    Posted 8 months ago #

    Can you give me a link to your site so I can check it out?

  3. joshuaiz
    Member
    Posted 8 months ago #

  4. Virtus Designs
    Member
    Plugin Author

    Posted 8 months ago #

    What theme are you using? I looked at your tabs with Firebug but didn't see anything that jumped out that could be causing the error. Are you using a bootstrap based theme?

  5. joshuaiz
    Member
    Posted 8 months ago #

    I'm using the Bones starter theme. There's no bootstrap built in but I noticed the main nav menus have some of the same classes/ids as the bootstrap tabs. That said I have used your plugin on another site built with Bones and did not have a problem.

    One thing I noticed in the js that gets loaded is that it tries to add/remove the .active class like so:

    function next() {
            $active
              .removeClass('active')
              .find('> .dropdown-menu > .active')
              .removeClass('active')
    
            element.addClass('active')

    .dropdown-menu is not found within the tabs HTML markup anywhere. It should be finding .nav-tabs li.active (or something similar)

Reply

You must log in to post.

About this Plugin

About this Topic