Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi everyone, I tried following this addition
to the product code but keep getting this error:
Solved! Go to the solution
This is an accepted solution.
Open main-product.liquid file from your code editor and paste this at the bottom of everything
<script>
document.addEventListener('DOMContentLoaded',()=>{
const tab = document.querySelector('.product .product__accordion');
tab.querySelector('details').setAttribute('open','');
tab.querySelector('summary').setAttribute('aria-expanded','true');
})
</script>
This will open the first one of the tabs on load
Share the store url.
This is an accepted solution.
Open main-product.liquid file from your code editor and paste this at the bottom of everything
<script>
document.addEventListener('DOMContentLoaded',()=>{
const tab = document.querySelector('.product .product__accordion');
tab.querySelector('details').setAttribute('open','');
tab.querySelector('summary').setAttribute('aria-expanded','true');
})
</script>
This will open the first one of the tabs on load