Title: Jquery Problem
Last modified: July 6, 2021

---

# Jquery Problem

 *  Resolved [SimpleRick](https://wordpress.org/support/users/keramikoch/)
 * (@keramikoch)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/)
 * Hi dear support,
 * I get the following error on chrome lighthouse dev tools only when I have activated
   autoptimize:
 * ReferenceError: geot is not defined at Object.initSelectize ([https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:256:13](https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:256:13))
   at HTMLDocument.ready ([https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:20:20](https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:20:20))
   at mightThrow ([https://ashwaganda.ch/wp-includes/js/jquery/jquery.js:3762:29](https://ashwaganda.ch/wp-includes/js/jquery/jquery.js:3762:29))
   at process ([https://ashwaganda.ch/wp-includes/js/jquery/jquery.js:3830:12](https://ashwaganda.ch/wp-includes/js/jquery/jquery.js:3830:12))
 * Geotargeting is a plugin, I tried to exclude the js from jqeruy and geotargeting
   from optimization in autooptimize, but it does not change the error.
 * Do you have any idea what I could do?
 * Thanks in advance.
 * Excluded:
    wp-includes/js/dist/, wp-includes/js/tinymce/, jquery.min.js, geotarget-
   public.js, jquery.js

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14630603)
 * that’s the geotargetting inline JS that is (also) aggregated, either disable “
   also aggregate inline JS” or add e.g. `geoloc_force` to the comma-separated JS
   optimization exclusion list and all should be fine 🙂
 * hope this helps,
    frank
 *  Thread Starter [SimpleRick](https://wordpress.org/support/users/keramikoch/)
 * (@keramikoch)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14630675)
 * Hi Frank,
 * yes I tried to exclude geolocation to the comma-separated JS (See abpove my exluded
   list).
    But why “geloloc_force” ? Do you mean “geoloc_force.js” ?
 * I excluded: “geotarget-public.js”
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14630697)
 * because the geolocation plugin also adds “inline” javascript in the HTML and 
   you have “also aggregate inline JS” on. disabling that last option is the easiest
   solution 🙂
 *  Thread Starter [SimpleRick](https://wordpress.org/support/users/keramikoch/)
 * (@keramikoch)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14630779)
 * I did this, disabeld also aggreate inline js, now the error message is:
    geotarget-
   public.js:524 ReferenceError: jQuery is not defined at [https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:524:4](https://ashwaganda.ch/wp-content/plugins/geotargetingwp/public/js/geotarget-public.js:524:4)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14630803)
 * you seem to have removed some (or all) of the JS exclusions? you’ll at least 
   have to re-add `jquery.js` in the exclusion list 🙂
 *  Thread Starter [SimpleRick](https://wordpress.org/support/users/keramikoch/)
 * (@keramikoch)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14634070)
 * Hi, yes that is true 🙂
    Thank you, it fixed the problem.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14634208)
 * 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 7 replies - 1 through 7 (of 7 total)

The topic ‘Jquery Problem’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/jquery-problem-33/#post-14634208)
 * Status: resolved