Bug Tracker

Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#4961 closed bug (invalid)

$('<style/>').append('styles') throws error in IE

Reported by: james_padolsey Owned by:
Priority: minor Milestone: 1.4
Component: manipulation Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


Try this:

$('<style type="text/css"/>').append('body{background:red;}')

Throws a runtime error in IE (6/7).

Instead of appending the text node the styles need to be added via --styleElement.styleSheet.cssText--

Change History (3)

comment:1 Changed 13 years ago by dmethvin

Component: unfiledmanipulation

I don't think this is a bug to be fixed, but I'll leave it open until we can find some place to document it.

comment:2 Changed 13 years ago by snover

Keywords: needsdocs added
Resolution: invalid
Status: newclosed

comment:3 Changed 12 years ago by dmethvin

Keywords: style append needsdocs removed
Note: See TracTickets for help on using tickets.