All things Shopify and commerce
I have a button embeded in an image that says 'check out our product range'. Instead of clicking this button and going to another page, I want to click this button and the product menu opens automatically from the header.
This is the button I want to push and I want it to open the menu in the image below.
This image shows all the options on the one page.
Thanks for your help.
Add js code to theme.liquid file
<script>
var btn = document.querySelector('.slideshow-button');
var menu = document.querySelector('#products_toggle');
var submenu =document.querySelector('.navmenu-meganav-item-parent .navmenu-submenu');
btn.addEventListener('click',function(e){
e.preventDefault();
menu.classList.add('navmenu-active');
submenu.classList.add('visible');
});
</script>
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By 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, 2024