Bug Tracker

Opened 10 years ago

Closed 9 years ago

#5271 closed bug (fixed)

$()

Reported by: Regent Owned by: john
Priority: major Milestone: 1.4
Component: selector Version:
Keywords: Cc:
Blocked by: Blocking:

Description

Hello! I use a translator, so excuse me for mistakes! $().end() returns [], ie it is impossible to return to the $() in the chain :(

Change History (5)

comment:1 Changed 10 years ago by dmethvin

I am not clear on what you are saying, can you attach an example?

comment:2 in reply to:  1 Changed 10 years ago by Regent

Replying to dmethvin:

I am not clear on what you are saying, can you attach an example?

Yes! $() returns [ window ], and $().end() returns [ ]. Example: $().find( selector ).show().end() - return [ ]. Can not use such a chain: $().data( 'startTime', new Date() ).find( '.foo' ).show().end().find( '.bar' ).hide(); Sorry for my English :)

comment:3 Changed 10 years ago by dmethvin

In your example, the .end() matches up with the previous .find() and should return you to the document. So I still am not clear on the problem Can you provide a complete test document?

comment:4 in reply to:  3 Changed 10 years ago by Regent

Replying to dmethvin:

In your example, the .end() matches up with the previous .find() and should return you to the document. So I still am not clear on the problem Can you provide a complete test document?

Sorry for the confusion, but that's the problem, which is impossible in such a chain re-use document!

comment:5 Changed 9 years ago by dmethvin

Resolution: fixed
Status: newclosed

This was fixed in 1.4; $() no longer returns [ window ].

Note: See TracTickets for help on using tickets.