code: function( elem, context, xml ) {
  			while ( (elem = elem[ dir ]) ) {
  				if ( checkNonElements || elem.nodeType === 1  ) {
  					return matcher( elem, context, xml );
  				}
  			}
  		}
docs: Check against closest ancestor/preceding element