Title: jquery error
Last modified: May 14, 2020

---

# jquery error

 *  Resolved [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/)
 * Hi guys,
 * I’m having a problem with Autoptimize and I cant figure out what’s going on. 
   Attempting to combine javascript and css files into fewer files to reduce the
   number of HTTP requests upon page load I installed Autoptimize and it worked 
   great. Then I noticed some elements on my page broke, which was somewhat expected.
   Since I didn’t know exactly which scripts needed to be excluded, I deactivated
   Autoptimize and decided to start again from scratch. But as I deactivated the
   plugin a bunch of jquery errors popped up in DevTools.
 * Screenshot of site before:
    [screenshot-of-site-before](https://gamblineers.com/before-site)
 * And screenshot of site after deactivation:
    [screenshot-of-site-with-errors](https://gamblineers.com/error-site)
 * If I open the site while logged in to wordpress, I don’t see the errors and the
   site looks right but if I go incognito or use another browser/computer, the errors
   appear. I guess that’s an admin/cache thing.
 * I can’t undo things more than I already did with deactivating the plugin and 
   if possible, I would like to continue using Autoptimize + figure out which scripts
   and css to exclude if possible.
 * Any ideas?

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/jquery-error-77/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/jquery-error-77/page/2/?output_format=md)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12833322)
 * you seem to be using “Async Javascript”, in there you’ll have to exclude jQuery
   from being either asynced or deferred.
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12833403)
 * That was fast, thank you!
 * It is better but some errors remain.
    [site with less errors](https://gamblineers.com/screenshot-less-errors)
 * What I don’t get is why didn’t I get these errors before? I have Async Javascript
   for quite some time now and jquery was never excluded yet the site worked fine.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12833423)
 * still seeing jquery asynced I’m afraid:
 * ![](https://i0.wp.com/i.imgur.com/MihIIwj.jpg?ssl=1)
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12833544)
 * Hmm, I tried asyncing jquery, defering jquery, excluding jquery and deactivating
   async plugin but nothing works. Actually all errors remain, I spoke too soon 
   before.
 * Right now I have both async and autoptimize deactivated. Does it make more sense
   to try solving the errors with plugins deactivated or activated as the problem
   began when I deactivated Autoptimize?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12833913)
 * start with AsyncJS disabled and AO enabled + make sure all page caches are cleared,
   we’ll take it from there 🙂
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838114)
 * Ok, I activated AO with the same settings as before.
    Currently I have these 
   locations excluded for both javascript and css: – wp-includes/js/dist/, – wp-
   includes/js/tinymce/, – js/jquery/jquery.js, – wp-content/plugins/elementor/,–
   wp-content/plugins/unlimited-elements-for-elementor/
 * The first 3 were already there by default.
    The errors are now gone but there
   are almost no pictures on site. I’m guessing I have to exclude some css?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838215)
 * ok can you add `wp-content/themes/neve/defer-recaptcha.js` or if that does not
   work `wp-content/themes/neve/` to the JS optimization exclusion list as well?
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838230)
 * I’m suspecting that I should somehow exclude additional CSS from the Theme Customizer.
   In there I have css applying to site logo, mobile menu, fixed elements, …, which
   all seem to be affected by AO. But I don’t know where the additional css is stored
   😛
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838242)
 * first things first; do images show when “optimize CSS” is off?
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838331)
 * Ha! Adding wp-content/themes/neve/defer-recaptcha.js worked, all images are back
   🙂
    Now there’s only one thing left – the big white space under the header on
   front page and the “side menu” (the grey rectangle with 3 links) which should
   be fixed to the right side of the page.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838433)
 * ok, so does that white space go away when disabling CSS optimization?
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838466)
 * Yes, it does. Uncheck aggregate?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838483)
 * good idea 🙂
 *  Thread Starter [adamovic](https://wordpress.org/support/users/adamovic/)
 * (@adamovic)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838504)
 * Ok 🙂 everything works.
    If I wanted css to stay aggregated, I would need to 
   find the css file which should be excluded and add it right?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years ago](https://wordpress.org/support/topic/jquery-error-77/#post-12838511)
 * well, next up; re-enable “aggregate CSS” but disable “also aggregate inline CSS”?

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/jquery-error-77/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/jquery-error-77/page/2/?output_format=md)

The topic ‘jquery error’ 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/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 21 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/jquery-error-77/page/2/#post-12839826)
 * Status: resolved