JS Dynamic loading CSS Tutorials and javascrpt files
This article is a free JS dynamic loading css and javascrpt file download package, if you are looking for dynamic loading JS or dynamic load CSS JS function here is very good ha, He can traverse javascrt or link to add again depending on user settings.
*/
Function $import (path,type,title) {
var s,i
if (type = "JS") {
var ss = document.getElementsByTagName ("script");
for (i =0;i < ss.length i++)
{
if ( SS[I].SRC && ss[i].src.indexof (path)!=-1) return ss[i];
}
s = document.createelement ("script");
s.type = "text/web Effects";
s.src =path;
}
Else if (type = = "css")
{
var ls = document.getelementsbytagname ("link");
for (i = 0; i < ls.length i++)
{
if (ls[i) . href && ls[i].href.indexof (path)!=-1) return ls[i];
}
s = document.createelement ("link");br> s.rel = "Alternate stylesheet";
s.type = "Text/css";
s.href = path;
s.title = title;
s.disabled = false;
}
else return;
var head = document.getElementsByTagName ("head") [0];
Head.appendchild (s);
return s;
}
//Call Method
$import (' aa.js ', ' js ', ' JavaScript ');
</script>