I currently have issues in Webkit(Safari and Chrome) were I try to load dynamically (innerHTML) some html into a div, the html contains css rules (...), after the html gets
I know it's an older topic, but thought someone would benefit. I too needed to load css dynamically into my page (before everything rendered onload, according to included "component" templates):
var oStyle = $("");
oStyle.append("@import url(" + sTemplateCssUrl + ");");
oStyle.attr("type", "text/css");
$(document.head).append(oStyle);
I tried appending to document.head with a one-line approach -- worked in IE 10 and Chrome, but not in Safari. The approach above worked in all 3.