Bug Tracker

Modify

Ticket #5551 (closed feature: fixed)

Opened 4 years ago

Last modified 4 years ago

.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:1 Changed 4 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 4 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 4 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed
  • Component changed from unfilled to core

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.