Bug Tracker

Opened 8 years ago

Closed 7 years ago

#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:
Blocked by: Blocking:


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 (3)

comment:1 Changed 7 years ago by paul.irish

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

comment:2 Changed 7 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/

comment:3 Changed 7 years ago by john

Component: unfilledcore
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.