Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 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:

Description

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

$( '<div />', {
  class : "bar"
}).appendTo('#foo');

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 8 years ago by Rick Waldron

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

wrap "class" in quotes.

comment:2 Changed 8 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.