I'm loading a Google Hangouts button using their example script:
// Load Hangouts Buttons Async
window.___gcfg = {
lang: 'en',
parsetags: 'onload'
};
(function() {
// Load script
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
I setup a spinner using spin.JS and I want to stop/hide it when the Hangouts script loads. How do I insert a callback into the above loading function?