Hello, Is it possible to add a accordian style menu to the footer section in Dawn. Similar to the below image.
document.querySelectorAll(".footer-block__heading").forEach(function (heading) {
heading.addEventListener("click", function () {
let content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
});
How to Add This to Shopify YourYour Theme:
-
Go to Shopify Admin → Online Store → Themes.
-
Click “Customize” on your theme.
-
In the theme editor, go to “Theme settings” (bottom left).
-
Scroll down and click “Custom CSS”.
-
Paste the above CSS code and save changes.
and put the js file in theme.js file and then test it will work
1 Like
brilliant thank you, where can i locate the JS file, thank you
