i ex开发者_如何学JAVAecute a javascript with jQuery $.getScript. In the executed script i haven\'t access to the functions and variables of my source file.
$.getScript(\"somescript.js\", function() { alert(\'Load Complete\'); }); Once loaded, is it cached or is it loaded again if referenced more than once?
Basically what I\'m doing is checking for the existence of an object, if it\'s not found, the script will try to load the source file using getScript. I only want to check this once though then return