Side navigation
#10948 closed enhancement (duplicate)
Opened December 04, 2011 11:44AM UTC
Closed December 04, 2011 03:22PM UTC
Last modified December 04, 2011 03:22PM UTC
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.
Attachments (0)
Change History (4)
Changed December 04, 2011 11:53AM UTC by comment:1
Changed December 04, 2011 12:40PM UTC by comment:2
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.
Changed December 04, 2011 03:22PM UTC by comment:3
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