简体   繁体   English

现在可以在加载addThis时显示加载吗?

[英]Is it posible to now show loading when load addThis?

If the script tag is after addthis div. 如果脚本标记在addthis div之后。 It slow down loading of the page, I don't care that it slow down, but I would like to now show that the page is sill loading (google chrome show load favicon). 它减慢了页面的加载速度,我不在乎它是否减慢了速度,但是我现在想表明页面正在继续加载(google chrome show load favicon)。 I removed the script tag and put it to $(funcion) in my external file where all my jQuery code is. 我删除了脚本标签,并将其放在我所有jQuery代码所在的外部文件中的$(funcion)中。 But when script is loaded it still show loading favicon. 但是,在加载脚本时,它仍然显示正在加载网站图标。

var src = 'http://s7.addthis.com/js/250/addthis_widget.js#username=boobaloo';
$.getScript(src);

I also try to use 我也尝试使用

$('<script/>').attr('src', src).appendTo('head');

Is it posible to load addthis buttons and don't show that page is still loading? 是否可以加载addthis按钮并且不显示该页面仍在加载? Can someone explain why it show that the page is loading? 有人可以解释为什么它显示页面正在加载吗?

Try to include "addthis" script in a separate function and call the function wherever you want. 尝试将“ addthis”脚本包含在单独的函数中,然后在所需位置调用该函数。 Also call the method using setTimeout. 还使用setTimeout调用该方法。 Eg:- setTimeout('AddthisMethod', 1000); 例如:-setTimeout('AddthisMethod',1000);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM