Is this really the proper way to load jQuery and plugins, asynchronously, using Google's AJAX libraries API?
<!-- load the Google JS API -->
<script src="http://www.google.com/jsapi?key=example"></script>
<script>
// run when the page, including jQuery, has finished loading
function init(){
// fetch the plugin, hosted locally, with a callback
$.getScript("jquery-splitter/splitter.js", initSplitter);
}
// run this when the plugin script has loaded
function initSplitter(){
// have to use a timeout, otherwise the callback gets called before the script has eval'd
window.setTimeout(runSplitter, 1000);
}
// called from the timeout above
function runSplitter(){
// finally, use the plugin
$("#container").splitter();
}
// load jQuery asynchronously using the Google API
google.load("jquery", "1");
// set a callback to be called when the page has finished loading
google.setOnLoadCallback(init);
</script>