Shopify themes, liquid, logos, and UX
Hello,
I have a website where i have products with a big description and i am wondering if i can have them auto closed so only if the costumers want to read it they can open it, because right now they are auto open everytime.
TOYO theme
"https://fusionwave.dk/products/friskmixer%E2%84%A2" my one product
Thank you!
Hi yes this can be done with some custom code also there will be an option in the theme to auto close by default.
either im blind or there isnt a button there...
if possible could u send a screenshot?
Open theme.liquud file from the theme files find a phrase that say </body> in that file and paste the code very above of this phrase like
//your code
</body>
<script>
window.addEventListener('load', function() {
document.querySelector('.product .product__accordion.accordion details').removeAttribute("open");
});
</script>
</body>
Hello @Hartnum
Please follow the steps below after logging into the Shopify admin:
<script>
window.addEventListener('load', function() {
document.querySelector('.product .product__accordion.accordion details').removeAttribute("open");
});
</script>
Please hit Like and Mark it as a Solution if you find our reply helpful.
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Shopify Partner | Shopify Development Agency | Call: 877.536.3789
Canada: 150 King St W. STE 200, Toronto, ON M5H 1J9
| USA: 98 Cutter Mill Rd. STE 466, Great Neck, NY 11021
i dont understand the last bit u wrote? before the closing of the (</body>) tag?
if possible can u send a screenshot
Learn 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, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025