0

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...

Can anyone help

Sarah
  • 139
  • 1
  • 4
  • 14

2 Answers2

0

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)

Quamis
  • 10,924
  • 12
  • 50
  • 66
  • Okay, thanks, this does what you said it will do, but now it just delays the loading of the spry tabbed panels too, so seems like I will have to ask a different question. Maybe like, how do I load the spry tabbed panels completely before calling the jave for that content feed – Sarah Jul 20 '11 at 10:43
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.

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.

sth
  • 222,467
  • 53
  • 283
  • 367