You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FAQ Accordion问题:点击ORDER分类时如何关闭Account分类

Solution: Disable Multiple Collapsible Mode

The core issue here is your accordion is set to allow multiple panels to stay open at the same time (multipleCollapsible: true). To make clicking the ORDER category automatically close the MYACCOUNT category, you just need to adjust this configuration.

Step-by-Step Fix

  1. Find the accordion initialization line in your code:
    <div id="element" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "active":[0], "multipleCollapsible": true}}'>
    
  2. Change the multipleCollapsible value from true to false:
    <div id="element" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "active":[0], "multipleCollapsible": false}}'>
    

Why This Works

  • When multipleCollapsible is false, the accordion enforces a single open panel rule. Clicking any collapsed panel (like ORDER) will expand it and immediately close any other open panels (like MYACCOUNT).
  • The collapsible: true setting still lets you close the currently open panel by clicking its trigger if you want to collapse all sections.

Quick Additional Note

The active: [0] setting makes the first category in your $collectionTitle load as open. If MYACCOUNT is the first item in that collection, that’s why it’s expanded initially. To change which category starts open, adjust the index in the active array (e.g., active: [1] for the second category).

内容的提问来源于stack exchange,提问作者Mahi M

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:20:26