Make sure that the correct args are passed in to the filter callback (and by extension, the not callback). Fixes #5594.

This commit is contained in:
John Resig 2009-12-09 22:03:14 -08:00
parent a5f8a14411
commit 88572ee692
2 changed files with 4 additions and 2 deletions

View file

@ -8,7 +8,7 @@ var runtil = /Until$/,
var winnow = function( elements, qualifier, keep ) {
if ( jQuery.isFunction( qualifier ) ) {
return jQuery.grep(elements, function(elem, i) {
return !!qualifier.call( elem, i ) === keep;
return !!qualifier.call( elem, i, elem ) === keep;
});
} else if ( qualifier.nodeType ) {