Couple of thoughts:
1) $.each() is not for moving through an array. (is for doing
something to each matched DOM element) try: for(item in _json)
{ alert('item:'+item);}
2) try defining your global as an object. e.g. var _json = {};
-jason
On Jan 16, 2:17 am, Niels [EMAIL PROTECTED] wrote:
$.getJSON and all the AJAX functions are asynchronous; the function
returns before it gets any result. That's why there's a callback
function: it gets called when the data are available. So when you
write
load_comments();
$.each(_json.comments, function(comment) {
2 matches
Mail list logo