please check this:
var scripts = {};
require = function(src){
var id = Math.round(+new Date()/1000);
$.ajax({
url: src + '.json',
type: 'GET',
dataType: "json",
cache: false,
async: false,
success : function(data){
scripts[id] = data;
}
});
return scripts[id];
}
return undefined :/ What is the problem!? i don't know...
EDIT! 'async : false' and run!
srcvalid?