#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:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
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 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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.
Pull request -- https://github.com/jquery/jquery/pull/619