Pinterest 固定按钮不显示计数
我集成了“pinit”按钮,在pinterest.com上分享我的产品图片。但在我的网站上,它并没有在pinit按钮前面显示pincount。我已经编写了以下代码 这是我网站上的pin按钮Pinterest 固定按钮不显示计数,pinterest,Pinterest,我集成了“pinit”按钮,在pinterest.com上分享我的产品图片。但在我的网站上,它并没有在pinit按钮前面显示pincount。我已经编写了以下代码 这是我网站上的pin按钮 <a class="pin-it-button" target="_blank" count-layout="horizontal" href="http://pinterest.com/pin/create/button/?url=http://www.techmodi.com/demo/bliise
<a class="pin-it-button" target="_blank" count-layout="horizontal" href="http://pinterest.com/pin/create/button/?url=http://www.techmodi.com/demo/bliise/products/MTY=/MTQ=/products&media=http://www.techmodi.com/demo/bliise/uploads/product/thumb/1341565713_89a084d6ff75306b0b7ed4c0a1d61916_medium.jpg&description=Nicholson Bag Black">
<img border="0" title="Pin It" src="//assets.pinterest.com/images/PinExt.png">
</a>
&此js文件包含在标记关闭之前
<script type="text/javascript" src="assets.pinterest.com/js/pinit.js"></script>
如果有人有,请给我建议解决方案
谢谢添加始终在锚定标记中显示count=“true”您需要异步加载JavaScript文件。将
脚本
标记替换为以下内容:
<script type="text/javascript">
(function(d){
var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
p.type = 'text/javascript';
p.async = true;
p.src = '//assets.pinterest.com/js/pinit.js';
f.parentNode.insertBefore(p, f);
}(document));
</script>
(职能(d){
var f=d.getElementsByTagName('SCRIPT')[0],p=d.createElement('SCRIPT');
p、 类型='text/javascript';
p、 异步=真;
p、 src='//assets.pinterest.com/js/pinit.js';
f、 parentNode.insertBefore(p,f);
}(文件);
它不仅不起作用,而且还会破坏W3C验证(如果有人在乎的话)。