zurb/foundation — pull request #2673 by seantimm (2013-06-29 20:21:04+00:00)
Title: Support multi-expand / collapse for accordion

This change adds a new multi_expand option to section to allow for multiple accordion sections to be in an expanded state.

I noticed that the click.fndtn.section handler was getting called twice (once on the section and once at the document level) causing the multi_expand to collapse back in certain nested scenarios. I added a stopPropagation call to avoid this. I couldn't see any reason we'd want it to bubble up.

I kept the preventDefault() call in the toggle_active call to continue to allow deep_linking to bubble up to the browser.

Also, note that if one_up is true, the first accordion section will not collapse. I'm not clear on the expected behavior for one_up, so let me know if I need to change how this interaction works.

I tested the changes against https://github.com/seantimm/demo/blob/master/foundation-demo/section-nested.html. You'll need to change the the last script line to the following if you want to try it out:

```javascript
$('.mainTabs').foundation('section', { deep_linking: true, multi_expand: true, one_up: false });
```