Title: Optimise JavaScript Code breaks menu dropdowns
Last modified: May 20, 2020

---

# Optimise JavaScript Code breaks menu dropdowns

 *  Resolved [davejeff66](https://wordpress.org/support/users/davejeff66/)
 * (@davejeff66)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/)
 * Hi,
 * If i check Optimise JavaScript Code it breaks the dropdowns in my navigation 
   menu (“Home – About – Buddhism – What’s On – Groups”) – they no longer appear
   on hover. If I uncheck the option then they work again. Is there any way I can
   fix this? Optimising the JavaScript has the biggest impact on my pagespeed score
   so it’d be nice to use it.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Foptimise-javascript-code-breaks-menu-dropdowns%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865023)
 * its seems to work now and JS opt. is still on davejeff66 ?
 * ![](https://i0.wp.com/i.imgur.com/12ECxHc.png?ssl=1)
 *  Thread Starter [davejeff66](https://wordpress.org/support/users/davejeff66/)
 * (@davejeff66)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865066)
 * Hi, thanks for your super fast response. Sorry, yes, I’m just checking and unchecking
   boxes trying to work find out which configuration I can get away with and have
   the menu working correctly. For now it seems I cannot use “Also aggregate inline
   JS”, and I have to use both “Force JavaScript in <head>” and “Add try-catch wrapping”.
   It’s dropped my PageSpeed score some but that’s the only way I seem to be able
   to have “Optimise JS Code” active. Do you have any other suggestions or is this
   what I’ll have to stick with?
 * Thanks again for getting back to me so quickly, and thanks for a great plugin
    -  This reply was modified 5 years, 11 months ago by [davejeff66](https://wordpress.org/support/users/davejeff66/).
      Reason: spelling
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865085)
 * try adding `themes/dechen/js/foundation.min.js` or else `themes/dechen/` to the
   comma-separated JS exclusion list maybe (and disable “force head” and “try/catch”)?
 *  Thread Starter [davejeff66](https://wordpress.org/support/users/davejeff66/)
 * (@davejeff66)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865155)
 * Great, that’s wonderful, thank you for your help!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865160)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Optimise JavaScript Code breaks menu dropdowns’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/optimise-javascript-code-breaks-menu-dropdowns/#post-12865160)
 * Status: resolved