延迟Javascript,因为它使我的Spry选项卡面板挂起

时间:2022-08-24 16:14:59

is there anything I can do to delay the loading of this script

我有什么办法可以延迟加载这个脚本

<script src="http://content.webcollage.net/p1084307575097/showcase?showcase=ciscodmr"></script>

Because it affects my Spry Tabbed Panels, there are four tabbed panels that appear below each other until the above content appears, and then only does it snap into place...

因为它会影响我的Spry选项卡式面板,所以有四个选项卡式面板会出现在彼此之下,直到出现上述内容,然后才会卡入到位...

Can anyone help

谁能帮忙

2 个解决方案

#1


0  

4 ways to dinamically load js files: http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html

4种方式来驱动js文件:http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html

You may do something like:

你可以这样做:

<script language="text/javascript">
    setTimeout(function(){ document.write("<script src='http://content.webcollage.net/p1084307575097/showcase?showcase=ciscodmr'><\/script>");}, 1000);
</script>

This will delay the loading by 1s(1000ms)

这将使加载延迟1秒(1000毫秒)

#2


0  

I know this is old but it's still worth noting. In a spry region you can always add the class SpryHiddenRegion. It will hide the markup until the data is ready to be displayed.

我知道这已经过时了,但仍然值得注意。在spry区域中,您始终可以添加SpryHiddenRegion类。它将隐藏标记,直到数据准备好显示。

They also have a spry:readystate you can tack on to a region tag.

他们也有一个spry:readystate你可以粘贴到区域标签。

You can also setup the variables for your dataset first and then don't add any information on where to go to get the data until you're ready to go and get it.

您还可以先为数据集设置变量,然后不要添加任何有关获取数据的信息,直到您准备好去获取数据。

#1


0  

4 ways to dinamically load js files: http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html

4种方式来驱动js文件:http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html

You may do something like:

你可以这样做:

<script language="text/javascript">
    setTimeout(function(){ document.write("<script src='http://content.webcollage.net/p1084307575097/showcase?showcase=ciscodmr'><\/script>");}, 1000);
</script>

This will delay the loading by 1s(1000ms)

这将使加载延迟1秒(1000毫秒)

#2


0  

I know this is old but it's still worth noting. In a spry region you can always add the class SpryHiddenRegion. It will hide the markup until the data is ready to be displayed.

我知道这已经过时了,但仍然值得注意。在spry区域中,您始终可以添加SpryHiddenRegion类。它将隐藏标记,直到数据准备好显示。

They also have a spry:readystate you can tack on to a region tag.

他们也有一个spry:readystate你可以粘贴到区域标签。

You can also setup the variables for your dataset first and then don't add any information on where to go to get the data until you're ready to go and get it.

您还可以先为数据集设置变量,然后不要添加任何有关获取数据的信息,直到您准备好去获取数据。