Title: ReferenceError: jQuery is not defined
Last modified: October 11, 2023

---

# ReferenceError: jQuery is not defined

 *  [ensonc](https://wordpress.org/support/users/ensonc/)
 * (@ensonc)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/)
 * Hello,
 * Thank you for creating such a quality plugin.
   I recently went to pagespeed for
   testing, and saw that there is an error that comes from Easy Tabel of Contents:
   ReferenceError: jQuery is not defined at [https://mydomain.com/wp-content/plugins/easy-table-of-contents/assets/js/front.min.js?ver=2.0.56.1-1696873727:1:1](https://mydomain.com/wp-content/plugins/easy-table-of-contents/assets/js/front.min.js?ver=2.0.56.1-1696873727:1:1)
   May I ask how to solve it? I m using WP Rocket, and i have already excluded the/
   easy-table-of-contents/assets/js/front.min.js to be miniflied / defered / delayed,
   but it is still not working.
 * Thank you.
 *     ```wp-block-code
       jQuery(function(t){if("undefined"!=typeof ezTOC){function e(){if(0!==t(".ez-toc-widget-container.ez-toc-affix").length){var e=30;void 0!==ezTOC.scroll_offset&&(e=parseInt(ezTOC.scroll_offset)),t(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:e})}if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},void 0!==ezTOC.visibility_hide_by_default){var i=t(".ez-toc-toggle:not(.ez-toc-loaded),.ez-toc-widget-sticky-toggle:not(.ez-toc-loaded)"),o=ezTOC.visibility_hide_by_default;t.each(i,function(e,i){var c=t(this);t(c).addClass("ez-toc-loaded");var a=t(c).parents("#ez-toc-container,#ez-toc-widget-container,#ez-toc-widget-sticky-container").find("ul.ez-toc-list,ul.ez-toc-widget-sticky-list");t(a).hasClass("eztoc-toggle-hide-by-default")&&(o=1),Cookies?(1==Cookies.get("ezTOC_hidetoc-"+e)?t(c).data("visible",!1):t(c).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+e)):(t(c).data("visible",!0),Cookies.remove("ezTOC_hidetoc-"+e)),o&&t(c).data("visible",!1),t(c).data("visible")||a.hide(),t(c).on("click",function(i){i.preventDefault();let c=document.querySelector("#ez-toc-container");if(c)c.classList.toggle("toc_close");else{let s=document.querySelector(".ez-toc-widget-container,.ez-toc-widget-sticky-container");s.classList.toggle("toc_close")}t(this).data("visible")?(t(this).data("visible",!1),Cookies&&(o?Cookies.set("ezTOC_hidetoc-"+e,null,{path:"/"}):Cookies.set("ezTOC_hidetoc-"+e,"1",{expires:30,path:"/"})),a.hide("fast")):(t(this).data("visible",!0),Cookies&&(o?Cookies.set("ezTOC_hidetoc-"+e,"1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc-"+e,null,{path:"/"})),a.show("fast"))})})}var c,a,s,l=t("span.ez-toc-section").toArray(),n=(c=l,c.reduce(function(e,i){var o;return e[i.id]=t('.ez-toc-widget-container .ez-toc-list a[href="#'+t(o=i).attr("id")+'"]'),e},{})),r=t.map(n,function(t,e){return t}),d=(a=5,void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(a=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30),s=t("#wpadminbar"),s.length&&(a+=s.height()),a);function h(){var e,i,o,c,a,s=(e=d,i=l,o=t(window).scrollTop()+e+1,c=i[0],a=o-t(c).offset().top,i.forEach(function(e){var i=o-t(e).offset().top;i>0&&i<a&&(a=i,c=e)}),c);if(s){var h,f,g,z,v,u,p,b,$,w=n[s.id];(function t(e,i){i.forEach(function(t){e!==t&&t.parent().hasClass("active")&&t.parent().removeClass("active")})})(w,r),(g=(h=w).parent()).hasClass("active")||g.addClass("active"),$=(z=f=g,v=t(z),u=v.html(),v.parent().append('<li id="ez-toc-height-test" class="active">'+u+"</li>"),p=t("#ez-toc-height-test"),b=p.height(),p.remove(),b-(v.children("ul").first().height()||0)),t(".ez-toc-widget-container ul.ez-toc-list li.active").css("height",$+"px")}}function f(){t(window).off("load resize scroll",h)}l.length>0&&t(".ez-toc-widget-container").length&&t(window).on("load resize scroll",h)}t("#ez-toc-container").length&&!t("#ez-toc-container .ez-toc-toggle label span").html()&&t("#ez-toc-container .ez-toc-toggle label").html(ezTOC.fallbackIcon),ezTOC.init=function(){e()},e()}});
       ```
   

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

 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17115660)
 * Hi, thanks for reaching out to us. We have investigated the issue and it appears
   that this problem is caused by a conflict with another plugin. This conflict 
   affects the main library file and leads to the removal of “/easy-table-of-contents/
   assets/js/front.min.js” from the plugin. Please try to correct this file, and
   if it doesn’t resolve the issue, make necessary corrections that were not currently
   exclude.
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17152764)
 * Hi, we are marking this ticket as resolved due to inactivity. Please feel free
   to reach out to us if you have any concerns by creating a new thread. We will
   be happy to assist you there.
 *  Thread Starter [ensonc](https://wordpress.org/support/users/ensonc/)
 * (@ensonc)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17424772)
 * Hello,
 * Thanks for getting back.
 * May I know which plugin is conflict with Easy table of Contents? And what do 
   you mean “correct this file”?
 * Thank you.
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17426693)
 * Hi, please update the plugin once with the latest **version 2.0.62** and clear
   the cache once. If the issue remains the same let us know.
 *  Thread Starter [ensonc](https://wordpress.org/support/users/ensonc/)
 * (@ensonc)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17429541)
 * [@magazine3](https://wordpress.org/support/users/magazine3/) Hello, I have updated
   the plugin and cleared the cache, and the issue remains.
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17435793)
 * Hi, Could you please share the URL once on which you are facing this issue, so
   we can check on our end?
 *  Thread Starter [ensonc](https://wordpress.org/support/users/ensonc/)
 * (@ensonc)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17435907)
 * [@magazine3](https://wordpress.org/support/users/magazine3/)
 * Hello,
 * Here is the [URL](https://daydayplay.hk/hktvmall、asos、sephora、parknshop-promo-code/)
 * Thank you.
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17438318)
 * Hi, We have checked on our end but found no errors as you mentioned. You can 
   see this in the screenshot attached: [https://paste.pics/QF1VF](https://paste.pics/QF1VF),
   Kindly clear the cache on your side and recheck.
 * If the issue persists, please let us know how you are checking those errors on
   your end. Kindly share a short video so we can follow the same steps to identify
   the issue.

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

The topic ‘ReferenceError: jQuery is not defined’ is closed to new replies.

 * ![](https://ps.w.org/easy-table-of-contents/assets/icon-256x256.png?rev=3045459)
 * [Easy Table of Contents](https://wordpress.org/plugins/easy-table-of-contents/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-table-of-contents/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-table-of-contents/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Magazine3](https://wordpress.org/support/users/magazine3/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/referenceerror-jquery-is-not-defined-9/#post-17438318)
 * Status: not resolved