The parent option of Collapse does not work without ".accordion-group" css class
The parent option of Collapse does not work without .accordion-group css class
Here the jsfiddle. http://jsfiddle.net/AFPE2/1/
I guess the collapse module should not have dependency with .accordion-group css class.
but the collapse code has it on here;
Maybe it should be like below.
Now:
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
Maybe should be...
actives = this.$parent && this.$parent.find('> .collapse.in')
but sorry, I have not tested its code.
If I have a time, I'll send pull-request.
Ran into the same issue today.
@soundTricker: Thanks for your fix. Works for me!
@holgua Thanks :) But sorry, I couldn't send pull request....
Still having this issue when downloading from the repo
Would it not be better to add a css class for collapsing non accordion groups? This would make my life a lot easier and take away the use of added js.
parent is for accordions only
The usage notes specifically say: To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.
In other words ... it's NOT for accordions only, it is a method of bringing "accordion-LIKE" group management to other non-accordion elements and, according to the usage notes, should be available without using the full accordion markup.
As this issue IS an issue and has not been resolved it should not have been closed!
Agreed. Why is this closed? At the least the documentation should be updated to note that the accordion group class is required. As it stands it is completely unclear which classes are required and which are optional. This has not been resolved at all.
Happy to pull request the above fix if it will help. Patched it in to my branch and everything looks good.
+1, this is really annoying and lost several hours searching for the answer. Should not be closed, needs a fix.
Your fix for the bootstrap.js worked for me.
+1, it should be fixed
+1. Ran into this issue today. Why is this restricted to .panel here ?
https://github.com/twbs/bootstrap/blob/master/js/collapse.js#L51
Pull request that solves this problem: #10966