Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10948 closed enhancement (duplicate)

Proposing to add similar to $.fn.eq behavior for $.fn.end method.

Reported by: markel Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

Sometimes traverse chain might be long, sometimes it is required to climb couple states up, instead of one.
Than, in order not to break chain and not traverse some more, it's need to call end method couple times, like when you use parentNode property in DOM.

I'm proposing to eliminate this calls by replacing them to just one call with extra argument if needed.

Change History (4)

comment:2 Changed 10 years ago by scottgonzalez

I feel like this had been proposed before and denied because it encourages developers to write code that is hard to read. I can't seem to find the old discussion, I did a quick check in Trac and the 1.6 and 1.7 roadmap proposals.

comment:3 Changed 10 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Definitely makes code harder to read. Match up each filtering method with an .end() instead.

We like to keep the pull queue relatively clean, so please query about these on #jquery-dev before making pull requests.

comment:4 Changed 10 years ago by dmethvin

Duplicate of #6457.

Note: See TracTickets for help on using tickets.