Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tatiana Frambach
7,791 Pointsbootstrap collapse not auto-collapsing
Hey Folks
I'm trying to implement bootstrap collapse in a project, and i'm having trouble with the auto-collapsing part. Suppose there are 3 divs: A, B and C. if A is open and I click on B, A should auto-collapse, but it doesn't. I want only one section to be open at the same time.
I've already checked multiple times my code, and also some tutorials and other questions here, but still can't make it work. Any help would be much appreciated.
Here is the fiddle: https://jsfiddle.net/3ap18Lda/2/
Thanks!
2 Answers
kenan tendzo
10,043 PointsHello, you can make something like this. https://jsfiddle.net/nuygkpso/
I don't have much time to spend on style. This is just example for you to see how it works. You must use 'Collapse' read more on Bootstrap page.
Tatiana Frambach
7,791 Pointskenan tendzo thank you! really appreciate it. :)