Skip to content

Instantly share code, notes, and snippets.

Created December 28, 2011 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1528436 to your computer and use it in GitHub Desktop.
Save anonymous/1528436 to your computer and use it in GitHub Desktop.
Listing 3.3 The script include snippet with separately-defined.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="./Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
</head>
<body>
<p>page starts rendering</p>
<p>script is loading asynchronously ... (in all browsers)</p>
<script type="text/javascript">
(function () {
var script = document.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.src = 'http://widget.dev/ThirdPartyjavascript/js/BlockingWidget'
var entry = document.getElementsByTagName('script')[0];
entry.parentNode.insertBefore(script, entry);
} ());
</script>
<h1>Welcome</h1>
<div data-stork-product="1337" />
<hr />
<div data-stork-product="2012" />
<hr />
<p>page has finished rendering</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment