Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9019 closed bug (invalid)

IE8: creating attribute class throws error

Reported by: drublic Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:


In IE8 I get an error while creating an element like this:

$( '<div />', {
  class : "bar"

This might have something to do with the 'class' attribute that is illegal to use. Here is a testcase: http://jsfiddle.net/drublic/fSxdm/

Hopefully this helps :)

Change History (2)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledattributes
Priority: undecidedlow
Resolution: invalid
Status: newclosed

wrap "class" in quotes.

comment:2 Changed 12 years ago by drublic

I fixed it with addClass() after creating the element. Thanks for your response.

Note: See TracTickets for help on using tickets.