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
Filtering & Sorting accordions are all open as default when page loads. With so many filtering options, I'm trying to close all the accordions for people to then click on and discover further.
Using Tinker 1.0.5
Solved! Go to the solution
This is an accepted solution.
Hello @HBaars
Please follow the steps below after logging into the Shopify admin:
Insert the provided Script code at the above of the closing of the body(</body>) tag
SS : https://prnt.sc/_D8KD40wFkJK
<script>
window.addEventListener('DOMContentLoaded', function() {
const facetPanels = document.querySelectorAll('.facets__panel');
facetPanels.forEach(function(panel) {
if (panel.hasAttribute('open')) {
panel.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
Hi @HBaars,
Can you send through a screenshot so I can see what you see?
Thank,
Jake
This is an accepted solution.
Hello @HBaars
Please follow the steps below after logging into the Shopify admin:
Insert the provided Script code at the above of the closing of the body(</body>) tag
SS : https://prnt.sc/_D8KD40wFkJK
<script>
window.addEventListener('DOMContentLoaded', function() {
const facetPanels = document.querySelectorAll('.facets__panel');
facetPanels.forEach(function(panel) {
if (panel.hasAttribute('open')) {
panel.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
This worked perfectly - thank you!
Hello @HBaars
Glad to hear that! Happy to help 😊
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