gka/visualisiert.org — Issue #3: framework: add $.assets to ender-js
Author: gka
Created: 2012-01-06 23:54:38+00:00
State: open

$.extend({
loadAssets: function(opt) {
var data = {};
for (var id in opt.urls) {
var context = { id: id };
$.ajax({
url: opt.urls[id],
success: function(content) {
data[this.id] = content;
for (var id2 in opt.urls) {
if (!data.hasOwnProperty(id2)) return;
}
opt.success(data);
},
context: context
});
}
}
});