Shopify themes, liquid, logos, and UX
Hey @INFRA
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<script>
document.addEventListener("DOMContentLoaded", function () {
const accordion = document.getElementById("Details-collapsible_tab_iXjwpE-template--18276682072252__main");
if (accordion && !accordion.hasAttribute("open")) {
accordion.setAttribute("open", "");
const summary = accordion.querySelector("summary");
if (summary) summary.setAttribute("aria-expanded", "true");
}
});
</script>
RESULT
If I managed to solve your problem then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
hi, thank you! The tab is opened on page visit but it's not opening smoothly. Can I add something to the code for this?
Thanks!
Hi @INFRA
You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file theme.liquid and add this code at the <head> - https://prnt.sc/4ce68MUf3aYx
<script>
document.addEventListener("DOMContentLoaded", function () {
const descriptionPanel = document.querySelector("#Details-collapsible_tab_iXjwpE-template--18276682072252__main");
if (descriptionPanel) {
descriptionPanel.classList.add("open");
}
});
</script>
Best,
DaisyVo
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025