My website has a hamburger menu with an accordion-style submenu implemented using jQuery for devices 1084px and smaller. For larger devices, the menu utilizes a hover-style submenu on desktop.
However, I encountered issues when trying to use both the hover (CSS) and accordion (jQuery) techniques simultaneously. To resolve this, I added media queries to my jQuery code, allowing both functionalities to work as intended.
Unfortunately, a new problem arose where the accordion would open and close multiple times automatically after applying the media queries. Can anyone offer assistance in resolving this issue that only occurs once the media query is added to my jQuery script?
Insert modified jQuery code here
You can view the corresponding jsfiddle here.
Thank you in advance for any help provided.