Possible Duplicate:
Dynamically changing stylesheet path not working in IE and Firefox
I am making a widget and need stylesheets to be loaded asynchronously. It's works just fine in Chrome with the following code:
if (config.stylesheets) {
$.each(config.stylesheets, function(i, path) {
$("<link/>", {
rel: "stylesheet",
type: "text/css",
media: "screen/projection",
href: path
}).appendTo("head");
});
}
However not in Firefox (3.6 in this case). Here the stylesheet is loaded but not applied. How would you suggest to manage this?