Skip to main content

Bug Tracker

Side navigation

#4961 closed bug (invalid)

Opened July 23, 2009 06:40PM UTC

Closed October 31, 2010 06:28PM UTC

Last modified May 20, 2011 04:23PM UTC

$('<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:
Description

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--

Attachments (0)
Change History (3)

Changed June 13, 2010 01:45PM UTC by dmethvin comment:1

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.

Changed October 31, 2010 06:28PM UTC by snover comment:2

keywords: style, appendstyle append needsdocs
resolution: → invalid
status: newclosed

Changed May 20, 2011 04:23PM UTC by dmethvin comment:3

keywords: style append needsdocs