If your JavaScript code resides in its own js file and not inside the HTML document you could also do this in the document:
<script>
google.load("jquery", "1.7.0");
google.load("jqueryui", "1.8.16");
google.setOnLoadCallback(function() {
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", "my.js");
document.getElementsByTagName("html")[0].appendChild(script);
});
</script>
This loads my.js after all other stuff is loaded from google. In your my.js file you can then do $(document).ready(...). So your application code is independent from "loaded by google" or "loaded directly from your server".
answered 2011-11-12T15:27:03.280