Load external css file like scripts in jquery which is compatible in ie also

jquery

Solution

In jQuery 1.4:

$("<link/>", {
   rel: "stylesheet",
   type: "text/css",
   href: "/styles/yourcss.css"
}).appendTo("head");

http://api.jquery.com/jQuery/#jQuery2

Problem

Is there a way to load external CSS files, like we load JS file by using .getScript method and also use the callback function like in .getScript ``` $("<link/>", { rel: "stylesheet", type: "text/css", href: "/styles/yourcss.css" }).appendTo("head"); ``` This Works in FireFox and similar but not in IE.

Original source

Related problems