Skip to content

Instantly share code, notes, and snippets.

@getify
Created May 26, 2010 17:10
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 getify/414758 to your computer and use it in GitHub Desktop.
Save getify/414758 to your computer and use it in GitHub Desktop.
<html>
<head>
<script>var _queue = [];</script>
</head>
<body>
...
...
<script>
_queue.push(function(){
// a bunch of inline code
});
</script>
...
...
<script src="LAB.js"></script>
<script>
var $L = $LAB
.script("1.js", "2.js", "3.js")
.wait(function(){
init1();
init2();
init3();
});
for (var i=0,len=_queue.length; i<len; i++) {
$L = $L.wait(_queue[i]);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment