Skip to main content

Bug Tracker

Side navigation

#5435 closed bug (invalid)

Opened October 31, 2009 09:45AM UTC

Closed November 01, 2009 02:35AM UTC

$.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:
Blocked by: Blocking:
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)}

});

});

Attachments (0)
Change History (1)

Changed November 01, 2009 02:35AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

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.