I want to link the drop down menu to a button embedded in the main page.

I want to link the drop down menu to a button embedded in the main page.

Lizpellow
Visitor
1 0 0

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.

Lizpellow_0-1726713973144.png

Lizpellow_3-1726714067868.png

 

 

This image shows all the options on the one page. 

Lizpellow_2-1726714047559.png

 

 

Thanks for your help.

Reply 1 (1)

wo
Shopify Partner
188 42 38

 

 

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>