var scriptFile = $(tempNode).attr(\"customJScriptSrc\");
When passing this i get
“Reference Error: Can’t find variable: $”
I had this same problem and it was caused by me putting my .js file before the jQuery .js file in the DOM. This was causing an error because it was trying to read my .js file before recognizing that jQuery was even installed. Always put all your scripts in order of execution and alway at the very bottom of the body
tag. This always makes sure that the page is fully loaded before trying to execute any javascript.
Before (Incorrect):
<script type="text/javascript" src="_javascript/rp-global.js"></script>
<script type="text/javascript" src="_javascript/jquery-3.2.1.min.js"></script>
After (Correct):
<script type="text/javascript" src="_javascript/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="_javascript/rp-global.js"></script>
add this script:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
at top of the document(added before your javascript code).
or download the library and reference it in you code.