Closed AccessPaul closed 1 year ago
Adding a video of the latest version of this. Changes include:-
is-active
classes across the various elements of navigation.https://user-images.githubusercontent.com/1227987/221359844-9eb7b51e-1e69-4eae-9034-5e754d982c76.mov
While updating the Wilson demo site, I discovered that the main menu javascript was very broken, and stupidly complex. This PR refactors the JS and styling for the main menu to fix the issues I spotted.
I rewrote the JS to use use Drupal
once
so that click events wouldn't be fired twice, which was the main reason why the menus weren't opening correctly. I also reduced some complexity by makingmakeActive
andmakeInactive
functions that help reduce repeated code.@ismael-abujadur I'm raising this PR against Wilson, but I'd strongly recommend you copy the updated files in to your custom WaterUK theme before you get too far along with the customisation.