title: Foundation 6 Multiple Accordions, how to have only one accordion expanded at once
body: <p>I am using Foundation 6's Accordion feature and have three separate accordions on one page. By default, within a single accordion, you can only have one content expanded at a time. However, I want to have only one content open at a time for all accordions on the entire page.</p>
  
  <p>I'm pretty sure I can accomplish this using their methods, specifically the "Up" method, however I cannot find any working examples and their documentation is pretty sparse. This is all they provide: </p>
  
  <pre><code>up
  
  $('#element').foundation('up', $target);
  
  Closes the tab defined by $target. 
  </code></pre>
  
  <p><a href="http://foundation.zurb.com/sites/docs/accordion.html" rel="nofollow">http://foundation.zurb.com/sites/docs/accordion.html</a></p>
  
  <p>I am not really sure where to go from here.. so far this is what I have: </p>
  
  <p>JS:</p>
  
  <pre><code>$(".accordion-title").click(function(e) {
    //Not sure what to do with this 
    $('#element').foundation('up', $target);
  });
  </code></pre>
  
  <p>HAML:</p>
  
  <pre><code>  %ul.accordion#accordion-1{:'data-accordion' =&gt; "", :'data-allow-all-closed' =&gt; "true"}
        %li.accordion-item
          %a.accordion-title
            Title 1
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 1
        %li.accordion-item
          %a.accordion-title
            Title 2
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 2
  
    %ul.accordion#accordion-2{:'data-accordion' =&gt; "", :'data-allow-all-closed' =&gt; "true"}
        %li.accordion-item
          %a.accordion-title
            Title 1
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 1
        %li.accordion-item
          %a.accordion-title
            Title 2
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 2
  
    %ul.accordion#accordion-3{:'data-accordion' =&gt; "", :'data-allow-all-closed' =&gt; "true"}
        %li.accordion-item
          %a.accordion-title
            Title 1
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 1
        %li.accordion-item
          %a.accordion-title
            Title 2
          .accordion-content{:'data-tab-content' =&gt; ""}
            Content 2
  </code></pre>