I inherited a site with terrible code, e.g.: 15000 lines of CSS, the mobile menu was not working but I was able to create a new mobile menu that kind of works, the issue is when I click on an item the menu flickers and the link underneath is the one that get activated.
this is the js code I used for the toggle, pretty sure this is the issue, but I am unsure of how to fix it.