Menu icon Foundation
Accordion item wrapping div

Hi there is there a way to have a containing wrapper "wantToAddaWrappingDivHere" for according-item elements, I really need a solution for this to add a wrapping div within the accordion.

If I add the extra div wrapping the elements i cant toggle the accordion anymore.

 

is there a way to maybe use the JS way of foundation so i can select the div to toggle, or would you guys recommend i just use pure jQuery

<div class="accordion" data-accordion data-options>
    <div class="accordion-item" href="#" id="item_#{id}" data-accordion-item>
       <div class="wantToAddaWrappingDivHere">
         <a href="" class="accordion-title">Title</a>
         <div class="accordion-content" data-tab-content>
             content here         
         </div>
       <div>
    </div>
</div>

accordions

Hi there is there a way to have a containing wrapper "wantToAddaWrappingDivHere" for according-item elements, I really need a solution for this to add a wrapping div within the accordion.

If I add the extra div wrapping the elements i cant toggle the accordion anymore.

 

is there a way to maybe use the JS way of foundation so i can select the div to toggle, or would you guys recommend i just use pure jQuery

<div class="accordion" data-accordion data-options>
    <div class="accordion-item" href="#" id="item_#{id}" data-accordion-item>
       <div class="wantToAddaWrappingDivHere">
         <a href="" class="accordion-title">Title</a>
         <div class="accordion-content" data-tab-content>
             content here         
         </div>
       <div>
    </div>
</div>
Rafi Benkual 12 months ago

What is the purpose for this extra div? Maybe there is another way to accomplish this but the structure of the .accordion > .accordion-item should remain as in the docs.