Modify ↓
Ticket #12155 (closed bug: invalid)
IE7 SCRIPT1028: Expected identifier, string or number
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8rc1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When I try creating and appending an element o body with a class IE throws that message.
my code (function(){
$('<div />', {
class: 'mydiv'
}).appendTo('body');
})();
if I change the class to a string value it works fine.
Change History
comment:1 follow-up: ↓ 2 Changed 10 months ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
comment:2 in reply to: ↑ 1 Changed 10 months ago by jaubourg
class is a reserved word
See, I quote it but it doesn't resolve the bug!
(edited so that it is more obvious what I did there)
comment:3 Changed 10 months ago by dmethvin
Well that's an entirely different bug, altogether.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

class is a reserved word, please quote it.