Can't find variable: $

Mohan picture Mohan · Feb 15, 2013 · Viewed 29.5k times · Source
var scriptFile = $(tempNode).attr("customJScriptSrc");

When passing this i get

“Reference Error: Can’t find variable: $”

Kindly suggest me any alternative methods.

Answer

Zaheer Ahmed picture Zaheer Ahmed · Feb 15, 2013

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.