( elements, qualifier, not )
| 2605 | |
| 2606 | // Implement the identical functionality for filter and not |
| 2607 | function winnow( elements, qualifier, not ) { |
| 2608 | if ( jQuery.isFunction( qualifier ) ) { |
| 2609 | return jQuery.grep( elements, function( elem, i ) { |
| 2610 | /* jshint -W018 */ |
| 2611 | return !!qualifier.call( elem, i, elem ) !== not; |
| 2612 | }); |
| 2613 | |
| 2614 | } |
| 2615 | |
| 2616 | if ( qualifier.nodeType ) { |
| 2617 | return jQuery.grep( elements, function( elem ) { |
| 2618 | return ( elem === qualifier ) !== not; |
| 2619 | }); |
| 2620 | |
| 2621 | } |
| 2622 | |
| 2623 | if ( typeof qualifier === "string" ) { |
| 2624 | if ( risSimple.test( qualifier ) ) { |
| 2625 | return jQuery.filter( qualifier, elements, not ); |
| 2626 | } |
| 2627 | |
| 2628 | qualifier = jQuery.filter( qualifier, elements ); |
| 2629 | } |
| 2630 | |
| 2631 | return jQuery.grep( elements, function( elem ) { |
| 2632 | return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; |
| 2633 | }); |
| 2634 | } |
| 2635 | |
| 2636 | jQuery.filter = function( expr, elems, not ) { |
| 2637 | var elem = elems[ 0 ]; |
no outgoing calls
no test coverage detected
searching dependent graphs…