Glen,
I use a couple methods:
1) Add an empty LINK and the set the href in the script:
$('#mylinkid').attr('href', stylesheetpath);
2) probably better but a little longer:
$('head').append('link id=mylinkid href=stylesheetpath
rel=stylesheet')
I'm sure someone will chime in here and tell me
this may also help
http://www.kelvinluck.com/article/switch-stylesheets-with-jquery
--
View this message in context:
http://www.nabble.com/Attach-a-Style-Sheet-tf2418733.html#a6744899
Sent from the JQuery mailing list archive at Nabble.com.
___
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)
Thanks for the info. i did not realize that.
--
View this message in context:
http://www.nabble.com/Attach-a-Style-Sheet-tf2418733.html#a6746281
Sent from the JQuery mailing list archive at Nabble.com.
___
jQuery mailing list
discuss@jquery.com
On 10/10/06, Glen Lipka [EMAIL PROTECTED] wrote:
I tried to make it
jQuery(link)
but that didn't seem to work (was looking in IE). The other one with
jQuery(document.createElement(link) did work.
What is the difference between jQuery() and $(). Why should you use one
over the other?
If
Brandon Aaron schrieb:
On 10/10/06, Glen Lipka [EMAIL PROTECTED] wrote:
I tried to make it
jQuery(link)
but that didn't seem to work (was looking in IE). The other one with
jQuery(document.createElement(link) did work.
What is the difference between jQuery() and $(). Why should you