jQuery dynamic css loading weired behavior
- by jimpsr
The app I am working on requires dynamic loading of css and js, right now the solution is as follows:
myapp.loadCss = function(css){
$("head").append("<link>");
cssDom = $("head").children(":last");
cssDom.attr({rel: "stylesheet",
type: "text/css",
href: css
});
}
…