Since you will base your site interactivity on jQuery, you may write JavaScript codes that throw the following error: Uncaught ReferenceError: jQuery / $ is not defined. If you build your website with WordPress, then you will be able to use jQuery in the custom theme that you are building. this is caused by an AdBlocker with active anti-annoyance List, e.g. When you want to build a microsite, jQuery can help you simplify client side interactivity. Each time I checked the webpage, it generated that same error, Uncaught ReferenceError: jQuery. * Therefore, the problem is not in the code you show, but in the code trying to use this function. When you face "not defined" error, it's about some fragment of code where the symbol in question is not defined. So I pass the jQuery argument when enqueuing the script: The markup for this selector is not Searching the forum i haven't got any post nor any way to resolve this. * Disabled Autoptimize and that didnt help. ".related-products > li" do not exists. jQuery Forum Move this topic Forum : Getting Started Using jQuery Using jQuery Plugins Using jQuery UI Developing jQuery Core Developing jQuery Plugins Developing jQuery UI QUnit and Testing About the jQuery Forum jQuery Conferences jQuery Mobile Developing jQuery Mobile Fanboys Annoyance List, in uBlock. jQuery seems not te be loaded within my custom template. Thrown Jquery not defined in the console once I defer jquery on the wordpress application. It is a well discussed problem, but I can't find the issue (I've been researching it for days now); Uncaught ReferenceError: jQuery is not defined. * In Autoptimize, I added exclusions such as js/jquery/jquery.js and plugins/tablepress, but these didnt help. 25 August jQuery before() and insertBefore() example. it will block the "cookies-min*.js" from being loaded, and WooCommerce can't handle it. Therefore, your question does not really make sense: you don't show the source of I'm new with jQuery (I started today) and I'm having this problem with Chrome. Uncaught ReferenceError: $ is not defined - jQuery The script wil initiate right but will not do anything as jQuery('.related-products > li') does not find any elements. In this post, we are going to see jQuery before and insertBefore methods. Therefore make sure that you're executing the jQuery code only after jQuery library file has finished loading. 3 comments Closed Uncaught ReferenceError: jQuery is not defined - compatibility with Enable jQuery Also if you're including the jQuery library file dynamically, inspect the page source using the browser's developer tool to ensure that it is included correctly and at right place. autoptimizesafari(2)chorome Both do the same task, insert text or html before every selected elements but syntax is quite different.