js: Uncaught ReferenceError: xxx is not defined
-
There is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this 'x' is not defined error . This usually indicates that your library is not loaded and JavaScript does not recognize the 'x'.
To solve this error: Load your library at the beginning of all your scripts.
There can be multiple other reasons for this issue:
- Added JavaScript library after the script were you see that error
- Conflict with Other JavaScript Libraries
- Path to JavaScript library you included is not correct
- The jQuery library file is corrupted
- May be a chance where you are working offline