JQuery statements reference and debugging

VS2008.

I have an MVC application and am dynamically rendering html for the controls that I create.

I wrote some javascript and put the .js file.

My main page has a link to my jquery js file.

Then the user element calls my html rendering code.

My js file uses jQuery.

When I debug, I get an "undefined" error when printing an expression in the Immediate window.

Is it because my js file is not referencing a jquery js file?

If so, how to do it?

Malcolm

+1
source share
2 answers

If you are not referencing jQuery then yes.

Make sure you enable it:

<script type="text/javascript" src="/dhtml/jquery-1.3.1.min.js"></script> 

.

Firebug Firefox javascript console.log

jQuery Firebug

0

,

, jquery - firebug, URL-, - . , firebug , JS/UI !

script ... URL- , ... , - url (http://localhost:1234/) .:

<script type="text/javascript" src="scripts/jquery-1.3.2.js"></script>

http://localhost:1234/scripts/jquery-1.3.2.js , JS ( ).

, .

0

Source: https://habr.com/ru/post/1707092/


All Articles