What Is an Uncaught Reference Error?
The Most Common Reason Behind the Error "Uncaught Referenceerror: $ Is Not Defined" Is Executing the jQuery Code Before the jQuery Library File Has Loaded...
The most common reason behind the error "Uncaught ReferenceError: $ is not defined" is executing the jQuery code before the jQuery library file has loaded. Therefore make sure that you're executing the jQuery code only after jQuery library file has finished loading.
What is a reference error?
The ReferenceError object represents an error when a non-existent variable is referenced.
Must Read
Why do we get reference error?
In JavaScript a reference error is mainly thrown when a code is attempting to reference a variable that does not exist, but there are many ways we can write our code that may trigger this reference error to be thrown.