Console: Uncaught ReferenceError: $ is not defined (jQuery not loaded or loaded after your code)
Your code uses jQuery's $ before jQuery has loaded — the script is missing, blocked, in the wrong order, or loaded async/defer after your code.
Uncaught ReferenceError: $ is not definedReferenceError: $ is not definedjQuery is not definedReferenceError: jQuery is not definedUncaught TypeError: $ is not a function Meaning
Scripts run in order. If your inline code or app.js comes before the jQuery <script>, or the jQuery file fails to load (404, blocked CDN, CSP, offline), $ and jQuery are undefined. Check the Network tab to see whether jQuery loaded at all.
Common causes
- jQuery
<script>placed after the code that uses it - jQuery file 404, blocked by CSP/adblocker, or the CDN is down
asyncordeferchanging execution order- A plugin loaded before jQuery
- Two incompatible jQuery versions (
noConflict)
⚡ Quick fix
- Load jQuery first, then plugins, then your code
- Check the Network and Console tabs for a failed jQuery request
- Wrap code in
$(document).readyonly after jQuery is present
Detailed fix by platform
JavaScript
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>then<script src="app.js"></script>(or usedeferon both so order is kept)- Debug:
console.log(typeof jQuery)
WordPress
- Use
wp_enqueue_script('my-js', ..., array('jquery'))and writejQuery(function($){ ... })— WordPress runs jQuery in noConflict mode
How to diagnose
- Order — Which script comes first?
- Load — Did the jQuery request succeed?
- Mode — noConflict / WordPress?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Aw, Snap! Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory
- captive portal Browser: This network requires you to sign in — captive portal (hotel, airport, café Wi-Fi) blocking HTTPS sites
- CSP violation Refused to load the script because it violates the following Content Security Policy directive
Most viewed in Browser
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026