开发者

Delaying Javascript because it makes my Spry Tabbed Panels Hang

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, the开发者_如何转开发re are four tabbed panels that appear below each other until the above content appears, and then only does it snap into place...

Can anyone help


4 ways to dinamically load js files: 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)


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.

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

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜