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 comment:1
| component: | unfiled → manipulation |
|---|
Changed October 31, 2010 06:28PM UTC by comment:2
| keywords: | style, append → style append needsdocs |
|---|---|
| resolution: | → invalid |
| status: | new → closed |
Changed May 20, 2011 04:23PM UTC by comment:3
| keywords: | style append needsdocs |
|---|
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.