Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7522 closed bug (worksforme)

Load external CSS in IE8

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:



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');

	$('<link/>', {
		rel: 'stylesheet',
		type: 'text/css',
		href: 'style.css'


Change History (5)

comment:1 Changed 12 years ago by snover

Resolution: worksforme
Status: newclosed

test case works for me.

comment:2 Changed 12 years ago by snover

#5819 is a duplicate of this ticket.

comment:3 Changed 12 years ago by netrunner

Can I reopen this bug, or do I need to create a new one?

comment:4 Changed 12 years ago by anonymous

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 addyosmani

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.