解决方案 »
- 能用谷歌地图api显示 几个经纬度点 形成轨迹
- 多个文本框联动效果求助
- 请问Ext的GridPanel 数据为空时怎么提示呢?
- 速度,一个极其简单的菜鸟问题
- js 提示层
- 50分求助,请看下面的代码,怎么添加不近去啊?很难的!!!!!!!!!!!!!!!!!!!!!
- 100分求:javascript中调用application的方法
- (急)在同一页面,同一表单,不用提交,实现如下功能
- 如何在脚本中调用JAVASCRIPT中的变量值!
- 急!!!!!平台:linux + php + mysql, 实现客户端分页打印设置。具体请进......
- 点击下拉列表菜单中的选项,下拉列表消失
- highchart 怎么显示后台数据的动态数据
addthis 有老的API和新的API
老的方法中,对于新增加的 dom
// Call this function once the rest of the document is loaded
function loadAddThis() {
addthis.init();
}这里还有个关键的地方:
Note that the addthis.init() option should only be called once. If you're rendering the buttons more than once your page, use the addthis.toolbox() or addthis.button() at the end of this document after calling addthis.init().就是说如果页面反复多次添加新的分享的dom进来,就得在 addthis.init() 后调用 addthis.toolbox() or addthis.button()新的api 就简单了很多, 一句话就搞定:
//always refresh on URL change
window.addEventListener("hashchange", function () {
addthis.layers.refresh();
});
应该就这么多了,希望对游泳的人有点帮助