I recently created a customized navbar using a script to add a hover effect to the menu links. You can find the script I used here: https://github.com/shadeed/underliner. Although I was able to get it partially working, there are still some issues.
The webpage is designed to be responsive, with a collapsible menu when the screen size is less than 990px.
The JavaScript function is called right before the closing tag. I attempted to place it elsewhere, but it didn't have the desired effect.
My first issue arises when the page loads with the collapsed mobile menu. The underline effect does not work in this scenario, even if I expand the page later. My assumption is that the data-target and aria-controls attributes prevent the JavaScript from running properly when the menu is collapsed.
My second problem involves aligning the collapsed menu list centrally on smartphones. Despite my efforts, I haven't been successful in achieving this, unlike the social section which aligns correctly (but they are in separate divs).