1// jQuery
2$.getScript('/path/to/imported/script.js', function()
3{
4 // script is now loaded and executed.
5 // put your dependent JS here.
6});
1var jsFile = document.createElement("script");
2jsFile.src = "homePage.js"; // it can be path also "{themes('/scripts/homePage.js')}"
3document.body.appendChild(jsFile); //append it as src to body