Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14388 closed bug (duplicate)

$(selector).every(fn) and $(selector).any(fn) methods would be a nice addition

Reported by: vigneshwaran Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

It will be very convenient if jQuery has .every() and .any() methods.

I gave it a try http://jsfiddle.net/vigneshwaranr/dYatz/

var result = $('p').every(function() { return <somecondition> });

is a lot simpler than doing the same with .each() method which requires a for loop every time.

Change History (2)

comment:1 Changed 6 years ago by vigneshwaran

Sorry for the duplicate (to #14389). Thought I cancelled the request. Please remove this.

comment:2 Changed 6 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #14389.

Note: See TracTickets for help on using tickets.