On a html page that uses $.getScript to dynamically load .js files.
Later at some point if I wish to check whether a particular .js file is loaded. How to do this?
Can I check using filename.js? or do I have to check for an object/function/variable in that file?
Thanks for the answers folks. You guys suggested callback function, global variable etc. But the thing is, I work in corporate environment where one corporate .js loads other .js(the one I'm trying to detect). Not only I can't modify corporate .js, I can't control when it'll change. I was hoping may be there was a way to know which .js file is loaded on page.