How can I debug why this click handler never fires?

I am going to talk about this in detail here. I am using Firefox 3.6.3 on Max OSX with Firebug 1.5.3.

I have two versions of the project, one of which works and one with an error. One I downloaded and one I typed manually. Guess which one doesn't work. They should be the same, except mine uses a newer version of jQuery, and the files are named differently. The jQuery version is not a problem. I used my old jquery and I made the worker use the new jquery. In any case, I still broke, and the downloaded one still works. I exposed my eyes, trying to understand how these projects are different. The only thing I do not want to do is copy the working code into the busted code, because I need to be able to compute this material when it is my own unique code that causes similar problems.

There are no errors that I can see in Firebug in my code, in fact, 2/3 of them work fine. only the second button does nothing. So I wanted to get through. These are always eyeball errors, and I really suck them.

I posted it on a public server. http://colleenweb.com/jqtests/ex71.html And I want to debug ex71.js

If you started the desktop and set a breakpoint on line 13 in ex71.js, the json variable has the expected values ​​when you click on the second button. But if you turn on this fire, it will never get there. I was over html and all the names of all seem to match. I also wonder why the buttons are not correct, but this is a css thing. Please tell me what I am missing, and more importantly, which tool / method I could use to find these types of errors.

+3
2

api.jquery:

For example, all strings represented in JSON, whether they are properties or values, must be enclosed in double-quotes. For details on the JSON format, see http://json.org/.

, ?

+3

, , , JSONP. ? . ?

$.getJSON('ex71.json', function(json) {
    $('input#tmpTitle').val(json.title);
    $('input#tmpCompany').val(json.company);
}); 

, =? JSONP, . , . , JSONP JSON ( , ).

http://api.jquery.com/jQuery.getJSON/

+1

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


All Articles