You pretty much have to do this:
google.setOnLoadCallback(function() {
$(function() {
// init my stuff
});
});
You can’t do $(document).ready()
without $
(the jQuery object) being available, so that needs to go inside the callback. And you can’t be sure the document is ready inside the callback, so you have to do ready()
too.