Modify ↓
Ticket #5626 (closed bug: invalid)
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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