Header dropdown menu stops working when “Optimize JavaScript Code” is enabled
-
Topic Title:
Header dropdown menu stops working when “Optimize JavaScript Code” is enabled
Link to the page you need help with:
Message:
Hi,
We are experiencing an issue with the Autoptimize plugin on our WordPress website.
When Optimize JavaScript Code is enabled, the header dropdown navigation menu does not work on some pages. The dropdowns do not open when hovering or clicking on the menu items.
We tested multiple pages and found that the issue occurs on pages such as:
- https://www.anunta.com/about-us/careers/
- https://www.anunta.com/our-team/vinod-jeyachandran/
- https://www.anunta.com/blog/accelerating-euc-transformation-with-cloud-adoption/
The homepage and some other inner pages work correctly, but these pages do not.
We performed the following troubleshooting:
- Cleared the Autoptimize cache.
- Checked the browser console and did not find any JavaScript errors related to the menu.
- Verified that the submenu HTML is present in the DOM.
- Disabled Optimize JavaScript Code in Autoptimize.
After disabling Optimize JavaScript Code, the header dropdown menu immediately started working correctly on all affected pages.
This suggests that JavaScript optimization is conflicting with the website’s header navigation.
Could you please help us identify:
- Why this conflict occurs?
- Which JavaScript file(s) should be excluded from Autoptimize?
- Is there a recommended Autoptimize configuration that allows us to keep JavaScript optimization enabled without breaking the header dropdown menu?
Thank you for your assistance.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.