Bug Tracker

Opened 8 years ago

Closed 6 years ago

#5712 closed enhancement (fixed)

Allow jQuery.fn.is to accept a function

Reported by: dayletter Owned by:
Priority: low Milestone: 1.6
Component: traversing Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

I am surprised that jQuery.fn.is does not handle the parameter as a function since it is more or less the same as jQuery.fn.filter(...).length > 0, while jQuery.fn.filter does accept a function.

Change History (6)

comment:1 Changed 7 years ago by snover

Milestone: 1.4.41.5

Retarget all enhancements/features to next major version.

comment:2 Changed 7 years ago by snover

Keywords: needsreview added

comment:3 Changed 7 years ago by Rick Waldron

Component: coretraversing
Priority: minorlow
Status: newopen

http://jsfiddle.net/9Va7k/

jQuery does not yet support this.

Additionally, I've closed http://bugs.jquery.com/ticket/2579 - as it requested the same support AND $.fn.not

comment:4 Changed 7 years ago by Rick Waldron

Owner: set to Rick Waldron
Status: openassigned

comment:5 Changed 6 years ago by john

Milestone: 1.next
Owner: Rick Waldron deleted
Status: assignedopen

Let's considering this for 1.7.

comment:6 Changed 6 years ago by timmywil

Keywords: needsreview removed
Milestone: 1.next1.6
Resolution: fixed
Status: openclosed
Version: 1.4a21.5.2

Now that I think about it, with my recent changes it already does: http://jsfiddle.net/timmywil/cLSBM/

Note: See TracTickets for help on using tickets.