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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…