MCPcopy
hub / github.com/kswedberg/jquery-smooth-scroll / getAll

Function getAll

lib/jquery/jquery.js:5299–5319  ·  view source on GitHub ↗
( context, tag )

Source from the content-addressed store, hash-verified

5297wrapMap.th = wrapMap.td;
5298
5299function getAll( context, tag ) {
5300 var elems, elem,
5301 i = 0,
5302 found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
5303 typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
5304 undefined;
5305
5306 if ( !found ) {
5307 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
5308 if ( !tag || jQuery.nodeName( elem, tag ) ) {
5309 found.push( elem );
5310 } else {
5311 jQuery.merge( found, getAll( elem, tag ) );
5312 }
5313 }
5314 }
5315
5316 return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
5317 jQuery.merge( [ context ], found ) :
5318 found;
5319}
5320
5321// Used in buildFragment, fixes the defaultChecked property
5322function fixDefaultChecked( elem ) {

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected