Google plus plusone.js有时是;待决“;在铬上?

Google plus plusone.js有时是;待决“;在铬上?,google-plus,Google Plus,使用Chrome(22.0…),有时,当我尝试拍摄: <script src="http://apis.google.com/js/plusone.js" type="text/javascript"></script> 它失败了。我的意思是,如果我检查网络控制台,它会显示“挂起…”,并且我的.load()事件会被卡住 为什么??我怎样才能修好它 还尝试了: <script type="text/javascript"> (function() {

使用Chrome(22.0…),有时,当我尝试拍摄:

<script src="http://apis.google.com/js/plusone.js" type="text/javascript"></script>

它失败了。我的意思是,如果我检查网络控制台,它会显示“挂起…”,并且我的.load()事件会被卡住

为什么??我怎样才能修好它

还尝试了:

<script type="text/javascript">
  (function() {
    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);
  })();
</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);
})();

但是它是一样的…

我没有看到在链接页面的源代码中定义的+1按钮的HTML容器。我看到您在页面上引用的第一个脚本,但您的页面似乎缺失:

<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-annotation="inline" data-width="300"></div>

启动时,它将显式呈现页面上的所有+1按钮。

是否有一个托管位置供我们自己查看?代码本身看起来很好,但可能发生了其他事情。因为我在页面加载时,使用jquery,在呈现它之前,将其放置在页面中!当您请求支持时,提供所有相关的详细信息是很重要的,包括网站URL、您正在尝试的方法。我已经编辑了我的答案来处理这些新信息。尝试过了,但仍然没有每次都呈现插件!问题不在于渲染,而在于“下载”plusone.js…我已经尝试了很多次,从未见过plusone.js文件无法为您的站点下载。我确实在Firefox和Chrome中看到了+1按钮的加载和显示,但直到第二张照片加载。我认为在调用gapi.plusone.go()方法时存在时间问题。我还看到控制台中的Facebook脚本出现Javascript问题,不确定是否相关,但如果它阻止正确加载父元素,可能就是原因。
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
  {parsetags: 'explicit'}
</script>
gapi.plusone.go();