1document.getElementsByTagName("head")[0].insertAdjacentHTML(
2 "beforeend",
3 "<link rel=\"stylesheet\" href=\"path/to/style.css\" />");
1var cssFile = document.createElement('link');
2 cssFile.rel = 'stylesheet';
3 cssFile.href = "styles.css"; // or path for file {themes('/styles/mobile.css')}
4 document.head.appendChild(cssFile); // append css to head element
1var cssFile = document.createElement('link');
2 cssLink1.rel = 'stylesheet';
3 cssLink1.href = "styles.css"; // or path for file {themes('/styles/mobile.css')}
4 document.head.appendChild(cssFile); // append css to head element
5