#7607 closed bug (duplicate)
$(window.location).attr('href', 'foo');
Reported by: | 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 13 years ago by
Component: | unfiled → attributes |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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 dowindow.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