unl / wdntemplates

The UNLedu Web Framework (WDN Templates) – Coordinated by the Web Developer Network
https://wdn.unl.edu
35 stars 32 forks source link

On desktop, main menu shifts left to right on click of a primary item #1645

Open ericras opened 1 year ago

ericras commented 1 year ago

Something about the hamburger menu icon isn't implemented as nicely as it could be. When you click a primary nav item on desktop (when the menu has sub links so that the hamburger is shown) the menu shifts and jiggles back and forth.

skoolbus39 commented 1 year ago

The reason for this is that some sites (like Nebraska Today) don't have secondary navigation items (in the mega menu). The hamburger icon is loaded programmatically via JavaScript only if any primary navigation items have children (secondary navigation). If there's a better way of implementing this, I'm all ears.