Ticket #5551 (closed feature: fixed)
.parentsUntil, .nextUntil, .prevUntil methods
| Reported by: | cowboy | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Per a conversation with John, I made this change: http://bit.ly/91B9PJ
Added jQuery.fn .parentsUntil, .nextUntil, .prevUntil methods (and unit tests). Modified jQuery.map and jQuery.dir to support an additional argument. Fixed existing .parents and .prevAll sorting. Fixed broken .parents unit test.
Note that this does include an actual bug fix, which I commented on here http://bit.ly/8smt7P
Either way, I hope this is helpful!
Change History
comment:2 Changed 3 years ago by cowboy
I agree that parentsUntil's utility is arguable.. but still, it's only 68 bytes minified, and its inclusion in core saves a gigantic amount of work should anyone need it.
Besides, it makes coloring arbitrary boxes really easy! http://benalman.com/code/projects/jquery-untils/examples/parentsuntil/
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I've seen the usecases for nextUntil and prevUntil a lot. Such as a DL where you have multiple DDs for a given DT. +1
But I've never myself seen a usecase for parentsUntil, nor seen another developer with a situation where it could be useful. -1