<div class="div_accordion">
<accordion class="my_accordion">
<accordion-group is-open="value1.open">
<accordion-heading>Heading 1</accordion-heading>
<p> Para 1</p>
</accordion-group>
<accordion-group is-open="value2.open">
<accordion-heading>Heading 2</accordion-heading>
<p> Para 2</p>
</accordion-group>
<accordion-group is-open="value3.open">
<accordion-heading>Heading 3</accordion-heading>
<p> Para 3</p>
</accordion-group>
</accordion>
</div>
打开另一个时,会关闭当前打开的标签。
我想在打开其他标签时保持当前标签打开。
使用accordion如何在angular / jquery中执行此操作?
答案 0 :(得分:1)
这将解决您的问题。
<div class="div_accordion">
<accordion class="my_accordion" close-others="false">
<accordion-group is-open="value1.open">
<accordion-heading>Heading 1</accordion-heading>
<p> Para 1</p>
</accordion-group>
<accordion-group is-open="value2.open">
<accordion-heading>Heading 2</accordion-heading>
<p> Para 2</p>
</accordion-group>
<accordion-group is-open="value3.open">
<accordion-heading>Heading 3</accordion-heading>
<p> Para 3</p>
</accordion-group>
</accordion>
</div>