mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 07:18:07 -05:00
No ticket: minor 1.x/2.x code standardization
This commit is contained in:
@@ -354,7 +354,7 @@ jQuery.extend({
|
||||
|
||||
// Boolean attributes get special treatment (#10870)
|
||||
if ( jQuery.expr.match.boolean.test( name ) ) {
|
||||
// Set corresponding property to false for boolean attributes
|
||||
// Set corresponding property to false
|
||||
if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
|
||||
elem[ propName ] = false;
|
||||
// Support: IE<9
|
||||
|
||||
@@ -255,23 +255,28 @@ jQuery.extend({
|
||||
function winnow( elements, qualifier, not ) {
|
||||
if ( jQuery.isFunction( qualifier ) ) {
|
||||
return jQuery.grep( elements, function( elem, i ) {
|
||||
return qualifier.call( elem, i, elem ) ? !not : not;
|
||||
/* jshint -W018 */
|
||||
return !!qualifier.call( elem, i, elem ) !== not;
|
||||
});
|
||||
|
||||
} else if ( qualifier.nodeType ) {
|
||||
}
|
||||
|
||||
if ( qualifier.nodeType ) {
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( elem === qualifier ) !== not;
|
||||
});
|
||||
|
||||
} else if ( typeof qualifier === "string" ) {
|
||||
if ( isSimple.test( qualifier ) ) {
|
||||
return jQuery.filter( qualifier, elements, not );
|
||||
} else {
|
||||
qualifier = jQuery.filter( qualifier, elements );
|
||||
}
|
||||
}
|
||||
|
||||
return jQuery.grep(elements, function( elem ) {
|
||||
if ( typeof qualifier === "string" ) {
|
||||
if ( isSimple.test( qualifier ) ) {
|
||||
return jQuery.filter( qualifier, elements, not );
|
||||
}
|
||||
|
||||
qualifier = jQuery.filter( qualifier, elements );
|
||||
}
|
||||
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user