Skip to main content

Bug Tracker

Side navigation

#12155 closed bug (invalid)

Opened July 27, 2012 02:49PM UTC

Closed July 27, 2012 02:50PM UTC

Last modified July 27, 2012 03:50PM UTC

IE7 SCRIPT1028: Expected identifier, string or number

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8rc1
Keywords: Cc:
Blocked by: Blocking:
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.

Attachments (0)
Change History (3)

Changed July 27, 2012 02:50PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

class is a reserved word, please quote it.

Changed July 27, 2012 03:00PM UTC by jaubourg comment:2

_comment0: Replying to [comment:1 dmethvin]: \ > `class` is a reserved word, please quote it. \ \ I quoted it but it didn't resolve the bug!1343401407214577
_comment1: Replying to [comment:1 dmethvin]: \ > `class` is a reserved word \ \ I quoted it but it didn't resolve the bug! \ \ (edited so that it is more obvious what I did there)1343401435116269
_comment2: Replying to [comment:1 dmethvin]: \ > `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)1343401480349142
_comment3: > `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)1343401499093431
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)

Changed July 27, 2012 03:50PM UTC by dmethvin comment:3