kenton.simpson schrieb:
> sorry you said stylesheet, but you get the idea.
> I haven't tested this yet, but it may work.
>
> jQuery(document.createElement("link"))
> .attr({type: "text/css",href: "my.css",rel:"stylesheet"})
> .appendTo("head");
>
To make it even more jQuerish:
jQuery("<link>")
.attr({type: "text/css",href: "my.css",rel:"stylesheet"})
.appendTo("head");
> I dont think that works in IE because jQuery will wrap the link in a div
> element. Which is not allowed in the head. FF seems ok with it even thou its
> not correct. try this.
>
It's true that jQuery creates a div first to use it's innerHTML
property, but that div is not inserted to the document.
-- Jörn
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/