Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am using Dawn theme and changed the hamburger icon by removing all the deafult code with my custom svg code but when i click it this shows
Where only cross icon should have been shown but my custom icon is also showing how can i only show the cross icon
Hi there,
can you share to me the code of your file?
Hi,
Check JavaScript that controls the toggling of the hamburger and cross icons (make sure code hides the custom SVG when the menu is open and shows the cross icon. )
Code example
const menuToggle = document.querySelector('.menu-toggle');
const menuIcon = document.querySelector('.menu-icon');
const closeIcon = document.querySelector('.close-icon');
menuToggle.addEventListener('click', () => {
menuIcon.classList.toggle('hidden');
closeIcon.classList.toggle('hidden');
});
Use CSS for Adjustment
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024