tekgrl
asked on
Why this error?: Uncaught TypeError: Cannot read property 'parents' of null
Why am I getting the following JS error: Uncaught TypeError: Cannot read property 'parents' of null
Here is the code I'm using:
https://codepen.io/asna_farid/pen/fKChk
Here is the code I'm using:
https://codepen.io/asna_farid/pen/fKChk
That Code Pen is not generating an error that I can see. What are the steps to reproduce?
ASKER
Added javascript to external file.
Make sure you have a reference to jQuery in your file if you're working outside of CodePen:
<script src="https://code.jquery.com/jquery-3.3.1.min.js" ></script>
I don't understand your response - where is the error?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That is not necessary - all that was required it to change the $ for the document ready to jQuery and pass $ as a parameter.
jQuery(function($) {
// Use $ as much as you want here
});