callback execution order in jQuery getJSON

Posted by lau on Stack Overflow See other posts from Stack Overflow or by lau
Published on 2010-03-24T13:29:30Z Indexed on 2010/03/24 13:33 UTC
Read the original article Hit count: 711

Filed under:
|
|
|

I'm trying to implement a iGoogle like dashboard interface using widgets that get their content from other sites using JSONP calls.

The problem is that if the first widget that calls the "$.ajax" takes 8 seconds to get the content back, it seems that the callbacks of the other widgets will only be called after the callback of the first widget gets executed. For the user experience, it would be better if the widgets could be displayed as soon as they get the content back from the remote sites, and not wait for those that were scheduled before to complete.

Is there a way I can do that?

© Stack Overflow or respective owner

Related posts about jquery-ajax

Related posts about jsonp