Mobile navigation menu item open by default

Topic summary

A user seeks to have a specific submenu item (“shop by style” under “shop”) open by default on mobile navigation for their website (wolvis.be).

Technical Challenge:

  • The user initially looked for a Liquid code solution
  • An image was provided showing the desired mobile menu state

Solution Provided:

  • Liquid alone cannot achieve this functionality
  • JavaScript is required instead
  • Implementation approach: identify the unique class/ID of the target element, then programmatically trigger the submenu on the second menu item click

Status: The question has been answered with a technical direction, but no specific code implementation has been provided yet.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

Hi,

I would like to have one of my submenu items open by default. But I can’t seem to find a code snippet that works. The website url is: www.wolvis.be

The menu item that should be open by default on the mobile version is ‘shop by style’ toggle in the ‘shop’ menu.

Could someone help me with the code snippet for my liquid.theme ?

Thank you!

Hello @wolisa ,

Not possible with liquid.

You need to go with JavaScript. Find the unique class/Id for the element.
And on click of the 2nd menu trigger its submenu.

Regards
Guleria