I am trying to reference to jquery library to provide intellisense on another javascript file. But I got error such as "Uncaught ReferenceError: $ is not defined"
/// <reference path="jquery.min.js" />
$(document).ready(function () {
alert("alert");
});
EDITED
Note: I have only one jquery library. Any other libraries have not been included.
Javascripts (including jQuery) are loaded with the following syntax:
<script type="text/javascript" src="url_to_your_script" />
Please review your HTML document to ensure that you have a line like that one, and that the src attribute points to the jQuery script's location. You can test it by copying the contents of the src attribute and pasting it in your browser's address bar.
As silly as it sounds, make sure that your script tags have a matching ending </script> tag. If you're missing one, it will mess up the loading of any scripts after it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With