JSFiddle - React, Tailwind, and code Playground
HTML
<div id='0'><b>one</b><br></div>
<div id='1'><b>two</b><br></div>
<div id='2'><b>three</b><br></div>
JavaScript
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
}
}
function addModule(column,name, j) {
var $column = $('#'+column);
$('<span/>',{ className:j }).appendTo($column);
$.get(request[column],function() {
$column.find('span.' + j).append(name);
});
}