Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#7724 closed bug (invalid)

.attr() issue in IE8

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

Problem in jQuery v1.4.4

.attr({class:"bigNews" , title:"myTitle"})

doesn't work in IE8, but Chrome works fine.

under IE8, it must write like this

.attr({"class":"bigNews" , "title":"mytitle"})

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

class is a reserved word in Javascript. Some browsers allow it as a bareword but you should always quote it or use className. (That is why the property is called className, to get around the reserved word problem.)

Note: See TracTickets for help on using tickets.