How to close collapsible row when another one is opened

I’m looking to close a collapsible row when another one opens up for mobile and desktop on dawn theme

url knmb1c-pf.myshopify.com

password samurai

Hi @undercoverfresh ,

May I suggest to update code these steps:

  1. Go to Store Online-> theme → edit code

  1. Assets/global.js
  2. find "summary.addEventListener(‘click’, (event) => { " after that add code below like the screenshot
document.querySelectorAll('.product__accordion   [id^="Details-"] summary').forEach((sum) => {
  sum.setAttribute('aria-expanded',false);
})
document.querySelectorAll('.product__accordion  [id^="Details-"]').forEach((sum) => {
  if(summary.parentElement.hasAttribute('open')!= sum.hasAttribute('open'))
    sum.removeAttribute('open');
})

Hi @undercoverfresh , thanks for reaching out.

I checked your request and would like to inform you that the feature you’re looking for is related to the JavaScript of your store’s theme. In this case, I recommend you contact the theme developer or hire a Shopify developer for custom coding.

I hope my information is helpful to you.

Liz

Code didn’t work