Bug Tracker

Modify

Ticket #5626 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Problems with attr method on Safari 4.0.3

Reported by: watinha Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.4a1
Keywords: attr Safari 4.0.3 Cc:
Blocking: Blocked by:

Description

It seem to have a little bug on the attr method of the JQuery object on Safari. I used it in an application and it worked fine for attributing values to id and class. However, in Safari 4.0.3 this method introduced a bug on the code and didn't run. The piece of code that I used is presented on the following: var divJetpackLink = document.createElement("div");

$(divJetpackLink).attr({

id: 'jetpackActivation', class: 'jetpackActivation'

});

Change History

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

The bare word class is a reserved word in Javascript. Either use className or "class" and it should work fine.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.