Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Runtime error: $ is undefined

I have added script in my Default.aspx page. I am getting following error. Error

like image 729
Ajay Avatar asked Jul 14 '13 08:07

Ajay


2 Answers

$ is defined by jQuery, which you probably haven't referenced. A simple way to get it is to add one of the CDN urls to your template HTML:

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
like image 96
Marcelo Cantos Avatar answered Sep 23 '22 17:09

Marcelo Cantos


You need to include jQuery: http://learn.jquery.com/about-jquery/how-jquery-works/

<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Demo</title>
    **<script src="jquery.js"></script>**
</head>
<body>
  ...
</body>
</html>
like image 39
CodingIntrigue Avatar answered Sep 25 '22 17:09

CodingIntrigue