MCPcopy Create free account
hub / github.com/idank/explainshell / siblingCheck

Function siblingCheck

explainshell/web/static/js/jquery.js:4449–4468  ·  view source on GitHub ↗
( a, b )

Source from the content-addressed store, hash-verified

4447};
4448
4449function siblingCheck( a, b ) {
4450 var cur = b && a,
4451 diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
4452
4453 // Use IE sourceIndex if available on both nodes
4454 if ( diff ) {
4455 return diff;
4456 }
4457
4458 // Check if b follows a
4459 if ( cur ) {
4460 while ( (cur = cur.nextSibling) ) {
4461 if ( cur === b ) {
4462 return -1;
4463 }
4464 }
4465 }
4466
4467 return a ? 1 : -1;
4468}
4469
4470// Returns a function to use in pseudos for input types
4471function createInputPseudo( type ) {

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected