Are you sure it's not an issue with your PHP?
It works fine for me (using alternate http requests).
Test it here: http://jsfiddle.net/kkxBH/1/ (updated)
Of course, items appended into the same column may not get appended in the same order as they were sent. But rather in the order in which the response is received. Not necessarily the same.
EDIT: Updated to ensure proper order.
moduleList = [['weather','test'],['test'],['some','other']];
request = ['http://www.microsoft.com',
'http://www.apple.com',
'http://www.google.com'];
for(i in moduleList) {
for(j in moduleList[i]) {
addModule(i,moduleList[i][j], j); //column,name, j index
}
}
// Receive "j" from inner for() loop
function addModule(column,name, j) {
// Reference the column
var $column = $('#'+column);
// Append a new <span> tag to the column that has
// the value of "j" as the class name
$('<span/>',{ className:j }).appendTo($column);
$.get(request[column],function() {
// Append the result to the proper span in the proper column.
// (Of course, you'll be appending your data returned.)
$column.find('span.' + j).append(name);
});
}