Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #20797
Closed
Open
Issue created Sep 27, 2016 by Administrator@rootContributor

Tabs JavaScript not removing 'active' class from nav-pills nav-stacked

Created by: Gong-Bao-Chicken

Expected Behaviour: When activating a nav-link, the active state gets removed and added to the now active nav-link. Therefore, the active state gets removed and added to the active item. Additionally the content transitions between the current and now active.

Problem: The active class is not being removed from nav-link. Thus each item can only be navigated to once.

Codepen ( UPDATED ) : http://codepen.io/anon/pen/ALRGqj?js-preprocessor=none

I hope the syntax is correct since there is no example in the docs:

<!-- Navigation -->
<nav class="nav nav-pills nav-stacked" role="tablist">
  <a class="nav-link active" data-toggle="pill" role="tab"  href="#profile">Active</a>
  <a class="nav-link" data-toggle="pill" role="tab" href="#buzz">Link</a>
  <a class="nav-link" data-toggle="pill" role="tab" href="#references">Link</a>
  <a class="nav-link disabled" href="#">Disabled</a>
</nav>

<!-- Tab panes -->
<div class="tab-content" role="tabpanel">
  <div role="tabpanel" class="tab-pane fade in active" id="profile">...</div>
  <div role="tabpanel" class="tab-pane fade" id="buzz">bbb</div>
  <div role="tabpanel" class="tab-pane fade" id="references">ccc</div>
</div>

edit: May be related to #20039 , but tabs work, pills (stacked) dont

Assignee
Assign to
Time tracking