Modify ↓
Ticket #5435 (closed bug: invalid)
$.get(url,fn,'json'),$.getJSON do not work in live event's callback
| Reported by: | doutu | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | unfiled | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
http://localhost/json echo {id:1,name:"json in live"}
$('a.json').live('click',function(e){
$.getJSON(' http://localhost/json.php',function(m){
for(var x in m){ $(x).val(m[x]);alert(x)}
});
});
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Given the partial code above it looks like the loop would execute twice:
$("id").val(1); alert(1); $("name").val("json in live"); alert("name");That doesn't make any sense to me.
Please reopen and attach a complete test case -- the minimal but complete html and javascript required to reproduce the problem. Or, if you really intended to write that code, please ask for help on the forums instead.