Shopify themes, liquid, logos, and UX
Hi
I need assistance with one of the collapsible tabs on the product page. Currently, all the tabs are closed by default, but I would like the first tab to be open by default.
Could someone help me with this?
Link: https://testingstoresandthemes.myshopify.com/products/780ml-shaker
Storefront password: lock
attaching photo for reference
Solved! Go to the solution
This is an accepted solution.
Hey @technase
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() {
var accordion = document.getElementById("Details-collapsible-row-1-template--18554506641653__main");
if (accordion) {
accordion.setAttribute("open", "");
}
});
</script>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This is an accepted solution.
Hey @technase
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() {
var accordion = document.getElementById("Details-collapsible-row-1-template--18554506641653__main");
if (accordion) {
accordion.setAttribute("open", "");
}
});
</script>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Hi Moeed,
I am trying to achieve the same thing on my site. Would your code be transferable to my liquid file or does it need to be custom code please?
Many thanks,
Paul
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025