The website uses the always responsive hamburger menu. I would like the hamburger menu to display open by default in the home page only showing the menu links.
What would be the correct way to display the hamburger menu open including the hamburger icon animation only in the home page?
The menu works as expected. I just want to display it open in the home page only. I am thinking to add the necessary css classes to the menu via javascript to the home page menu markup.
Yep - that would work well. Another approach may be to use media queries and ensure the menu is in its expanded mode when there is available screen width. I prefer this approach over the JS one since your page has to run extra code that may cause a few moments where the menu’s size flashes from collapsed to visible. You can certainly mitigate that, but the media query approach seems much simpler.
Good point. The tricky part is changing the responsive menu icon animation via css. The responsive menu can display open by adding the class ul#menu display block. However this does affect the responsive menu icon animation. Using css how would you change the state of the responsive menu icon from closed to open?