#7522 closed bug (worksforme)
Load external CSS in IE8
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi!
Trying to load an external stylesheet, but can't get it to work in IE8. I've tried jQuery 1.4.2 and 1.4.4.
Tried all these different approaches below. Tried putting the code inside and outside of $(function(){. Tried putting it in <head> and last in <body>. Nothing works in IE8
$('<link rel="stylesheet" type="text/css" href="style.css" />').appendTo('head'); $('<style type="text/css">@import url("style.css")</style>').appendTo('head'); $('head').append( $('<link/>', { rel: 'stylesheet', type: 'text/css', href: 'style.css' }) );
Change History (5)
comment:1 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
It seems like it's only a problem with relative URLs. It "works for me" only if I supply an absolute URL for the css file.
comment:5 Changed 12 years ago by
Testing using a relative URL and this seems to be working fine as well. http://jsfiddle.net/addyosmani/vs5NC/
Note: See
TracTickets for help on using
tickets.
test case works for me.