Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#7607 closed bug (duplicate)

$(window.location).attr('href', 'foo');

Reported by: sasfater@… Owned by:
Priority: undecided Milestone: 1.5
Component: attributes Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

I use this with jquery 1.4.2. and it was ok.

After upgrading 1.4.4 it says: a.setAttribute is not a function

Change History (2)

comment:1 Changed 9 years ago by jitter

Component: unfiledattributes
Resolution: duplicate
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report! But why do you even use .attr() on a non DOM element? It's easier and faster to do window.location.href = foo.

The next time please also submit a reduced test case along, which reproduces the issue you are experiencing (on http://jsfiddle.net). So that we can more easily investigate your issue further.

Btw. did you try searching the bug tracker for similar tickets, because you should have found #7500 and #7605 or one of the other many duplicates of #7500.
If/When that bugs gets fixed this should all be happily working again. In the mean time just use window.location.href = foo

Last edited 9 years ago by jitter (previous) (diff)

comment:2 Changed 8 years ago by addyosmani

#7582 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.