Created
March 18, 2010 15:08
-
-
Save anonymous/336447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------- file that loads first | |
function loader() | |
{ | |
var uri = 'http://a.com/skeleton.js'; | |
var headID = document.getElementsByTagName("head")[0]; | |
var newScript = document.createElement('script'); | |
newScript.type = 'text/javascript'; | |
newScript.src = uri; | |
headID.appendChild(newScript); | |
} | |
loader(); | |
… | |
some functions affects on skeleton built before | |
… | |
var foo= function(){} | |
----------------------skeleton.js | |
function skeleton_init(){ | |
//Drawing some divs here | |
setTimeout(foo, 1000); //<-cannot run this if simply copypaste content instead of function | |
} | |
skeleton_init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment