Bug Tracker

Modify

Ticket #7607 (closed bug: duplicate)

Opened 3 years ago

Last modified 15 months ago

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

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

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

comment:1 Changed 3 years ago by jitter

  • Status changed from new to closed
  • Resolution set to duplicate
  • Component changed from unfiled to attributes

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 3 years ago by jitter (previous) (diff)

comment:2 Changed 3 years ago by addyosmani

#7582 is a duplicate of this ticket.

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.