autoCollapse option for Accordion
This is also kind of a discussion and I fully expect that there will need to be some corrections to this idea, and also I started trying to tinker with accordion to create this feature but I figured it would be best to get input from those who know UI best as far as what kinds of changes would need to take place.
The main idea with autoCollapse is a flag for whether or not already active panels are collapsed upon the activation of a new one. In the old docs for 1.8 it was reported that implementing multiple panels being open at once would be too complicated: http://docs.jquery.com/UI/API/1.8/Accordion but in my searching on google it seems like a good number of people have tried to create this functionality, because the panel layout accordion uses is a good fit for such collapsible functionality (I understand there's a collapsible widget for jquery mobile but it doesn't look as nice imo). I made a *hackish* workaround for my site that I'm happy with if no one else thinks this should be implemented: http://jsfiddle.net/Assimilater/TDAY7/13/
I realize I'm not a guru and haven't been around very long but I *think* this could be done if we define some reasonable output. My thoughts on the matter thus far:
newHeader and newPanel would be defined the same. oldHeader and oldPanel would be as is if autoCollapse is true, but if autoCollapse is false (the default would be true to match the current functionality) they would be an empty $() array, and elements would be collapsed based on the user clicking them thus they would be in newHeader and newPanel.
I'm not sure what other points would need to be defined. But what does everyone think with the advancements UI has made since that doc was written? What other things would we need to define to make this work?
When in doubt, follow the most efficient pattern: the pattern nature created.
Life's greatest problems are often solved by small and simple means.