Created
November 6, 2017 17:38
-
-
Save claudiohilario/5e733e3f36b167f6a47857e1e038a87e to your computer and use it in GitHub Desktop.
Carregar ficheiros css javascript
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
//Load CSS | |
if(device.platform == 'iOS'){ | |
loadCSS('css/css-ios.css'); | |
} | |
/** | |
* Carrega Ficheiro de CSS | |
* @param url | |
* @returns {Element} | |
*/ | |
function loadCSS(url) { | |
var head = document.getElementsByTagName('head')[0], | |
link = document.createElement('link'); | |
link.type = 'text/css'; | |
link.rel = 'stylesheet'; | |
link.href = url; | |
head.appendChild(link); | |
return link; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment