Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The parent option of Collapse does not work without ".accordion-group" css class #4988

Closed
soundTricker opened this issue Sep 5, 2012 · 12 comments
Labels

Comments

@soundTricker
Copy link

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.

@holgua
Copy link

holgua commented Sep 26, 2012

Ran into the same issue today.

@soundTricker: Thanks for your fix. Works for me!

@soundTricker
Copy link
Author

@holgua Thanks :)
But sorry, I couldn't send pull request....

@veganista
Copy link

Still having this issue when downloading from the repo

@ShaneSheppard
Copy link

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.

@fat
Copy link
Member

fat commented Feb 8, 2013

parent is for accordions only

@fat fat closed this as completed Feb 8, 2013
@DiscoverySquare
Copy link

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!

@kav
Copy link

kav commented Jul 3, 2013

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.

@davekiss
Copy link

davekiss commented Jul 5, 2013

+1, this is really annoying and lost several hours searching for the answer. Should not be closed, needs a fix.

@axiomaximum
Copy link

Your fix for the bootstrap.js worked for me.

@umbrella-mikhail-menshinskiy

+1, it should be fixed

@selvagsz
Copy link

+1. Ran into this issue today. Why is this restricted to .panel here ?

https://github.com/twbs/bootstrap/blob/master/js/collapse.js#L51

@raeno
Copy link

raeno commented Oct 23, 2013

Pull request that solves this problem: #10966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests