How do I prevent $ .getScript from executing document.ready content?
I want to call a function that is in another JavaScript file.
function foo(){
//before $.getScript
$.getScript('otherScript.js', function() {
otherFoo();
});
//after $.getScript
}
But this will execute the entire $ (document) .ready () part of otherScript.js before calling the otherFoo () function. How can I disallow the $ (document) .ready () call and only call the otherFoo () function?
+3
source to share