Skip to main content

Bug Tracker

Side navigation

#15183 closed bug (duplicate)

Opened July 13, 2014 05:09PM UTC

Closed July 14, 2014 01:55AM UTC

appendTo not working when appending to head in IE8

Reported by: sylvaincourcoux Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

I have this simple script that creates a stylesheet and appends it to the head:

function Start() {
    
    var TheCSS = 'body{background:red;}';
    
    $('<style type="text/css" rel="stylesheet"></style>')
				  .html(TheCSS)
				  .appendTo("head");
}



$(Start);

As you can see in this jsFiddle http://jsfiddle.net/mej4h/, it doesn't work in IE8.

Sylvain Courcoux.

Attachments (0)
Change History (1)

Changed July 14, 2014 01:55AM UTC by gibson042 comment:1

resolution: → duplicate
status: newclosed

Duplicate of #9832.This is not a documented use of the .html method, and in particular <style> elements don't contain HTML.