#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"})
Note: See
TracTickets for help on using
tickets.
class
is a reserved word in Javascript. Some browsers allow it as a bareword but you should always quote it or useclassName
. (That is why the property is calledclassName
, to get around the reserved word problem.)