1

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?

Community
  • 1
  • 1
lyuba
  • 6,250
  • 7
  • 27
  • 37
  • 1
    This sounds like the same issue as in [this question](http://stackoverflow.com/questions/435785/dynamically-changing-stylesheet-path-not-working-in-ie-and-firefox) - [this answer](http://stackoverflow.com/questions/435785/dynamically-changing-stylesheet-path-not-working-in-ie-and-firefox/435865#435865) in particular. – Matt Ball Mar 25 '11 at 13:39

0 Answers0