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
  • #13636
Closed
Open
Issue created May 20, 2014 by Administrator@rootContributor

js .collapse() invocations don't toggle the .collapsed class for any of the collapse control elements

Created by: er1c

Took me a while to track down a repro case, but I finally managed to pin it down.

Repro example: http://jsbin.com/jatatucojuru/1/edit

The docs say

If you'd like it to default open, add the additional class in.

And then to "Via JavaScript":

 $('.collapse').collapse()

If I do this (add "in" to the accordions's class, and then invoke $('.collapse').collapse() on load), the accordion elements lack the .collapsed class on the .panel-heading as you can see below:

google chrome

If you manually just trigger the same accordions by clicking on them a few times, everything starts working fine again:

google chrome

Assignee
Assign to
Time tracking