Reputation: 1164
I have a live site and I open it on Internet explorer and right click on page and click on view source and copy all code from it and paste it on vs2010->Newwebsite and when i run my site on vs2010 an error occur.
Microsoft JScript runtime error: '$' is undefined
I don't understand what I do. Kindly suggest me. waiting for reply. Thanks
Upvotes: 1
Views: 1471
Reputation: 22234
First verify that jQuery is in fact being loaded.
if (window.jQuery) {
alert("jQuery is loaded!");
}
If that works, then you are most likely using something like jQuery.noconflict()
to remove the alias $
for jQuery.
Upvotes: 0
Reputation: 318182
You'd fix that by including jQuery!
Add the following to your page
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
However, it sounds like just an error in Visual Studio, and if it works when viewing the page in a browser, it shouldn't be an issue.
Upvotes: 2