Bug Tracker

Ticket #5712 (closed enhancement: fixed)

Opened 5 years ago

Last modified 3 years ago

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

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

comment:1 Changed 4 years ago by snover

  • Milestone changed from 1.4.4 to 1.5

Retarget all enhancements/features to next major version.

comment:2 Changed 4 years ago by snover

  • Keywords needsreview added

comment:3 Changed 4 years ago by rwaldron

  • Priority changed from minor to low
  • Status changed from new to open
  • Component changed from core to traversing

 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 4 years ago by rwaldron

  • Owner set to rwaldron
  • Status changed from open to assigned

comment:5 Changed 3 years ago by john

  • Owner rwaldron deleted
  • Status changed from assigned to open
  • Milestone set to 1.next

Let's considering this for 1.7.

comment:6 Changed 3 years ago by timmywil

  • Keywords needsreview removed
  • Status changed from open to closed
  • Version changed from 1.4a2 to 1.5.2
  • Resolution set to fixed
  • Milestone changed from 1.next to 1.6

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.