vendredi 20 juin 2014

Load CSS dynamically

Well you could do that without ExtJS...

Code:



var loadCssFunction = function(filename) {
var fileref=document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", filename);
}

loadCssFunction('myCSSFilePath.css');




Aucun commentaire:

Enregistrer un commentaire