#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: |
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--
Change History (3)
comment:1 Changed 13 years ago by
Component: | unfiled → manipulation |
---|
comment:2 Changed 13 years ago by
Keywords: | needsdocs added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:3 Changed 12 years ago by
Keywords: | style append needsdocs removed |
---|
Note: See
TracTickets for help on using
tickets.
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.