Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7357 closed bug (invalid)

unable to redirect pagewith 1.4.3

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:


I am using successfully in up to 1.4.2 this code $(location).attr("herf","localhost/jplo/");

but in 1.4.3 I am unable to do it

Change History (2)

comment:1 Changed 12 years ago by jitter

This isn't a bug. You are using jQuery in a way it isn't meant to be.

jQuery() doesn't support arbitrary javascript objects as collection elements. Also attr() is meant to operate on DOM elements not arbitrary javascript objects.

The reason your code worked before jQuery 1.4.3 was just by chance, so to speak an unwanted side-effect/feature which got removed in jQuery 1.4.3.

I also don't undertand why you would eveb be doing this at all. Just use

location.href = "localhost/jplo/";

directly which is way faster too. Aside from the fact this doesn't work anymore, there is no reason to wrap a javascript object in a jQuery object just to set a property on the object which you can do directly anyway.

comment:2 Changed 12 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

I second everything Jitter posted. Also you had a typo: "herf" !== "href"

Note: See TracTickets for help on using tickets.