I had the same problem. Using cordova3.1.0.
ref.executeScript( { file: "http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" //webURL works fine with 'file' }, function() { $.get("js/myscript.js", function(data) { //workaround to obtain code using jQuery.get ref.executeScript( { code: data }, function() { console.log('ref.executeScript done'); }); }); });
When I set the file url as webURL http: // ....,
it worked, but I could not figure out how to specify the local js file,
so I get lines of code using $ .get "js / myscript.js".
The sample code illustrates: jQuery is already installed in the phonegap application, and is also trying to use jQuery in the target inAppBrowser application. Just in case.
source share