MCPcopy Index your code
hub / github.com/jquery/jquery / remove

Function remove

dist-module/jquery.factory.module.js:5476–5495  ·  view source on GitHub ↗
( elem, selector, keepData )

Source from the content-addressed store, hash-verified

5474}
5475
5476function remove( elem, selector, keepData ) {
5477 var node,
5478 nodes = selector ? jQuery.filter( selector, elem ) : elem,
5479 i = 0;
5480
5481 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
5482 if ( !keepData && node.nodeType === 1 ) {
5483 jQuery.cleanData( getAll( node ) );
5484 }
5485
5486 if ( node.parentNode ) {
5487 if ( keepData && isAttached( node ) ) {
5488 setGlobalEval( getAll( node, "script" ) );
5489 }
5490 node.parentNode.removeChild( node );
5491 }
5492 }
5493
5494 return elem;
5495}
5496
5497jQuery.extend( {
5498 htmlPrefilter: function( html ) {

Callers 1

jQueryFactoryWrapperFunction · 0.70

Calls 3

getAllFunction · 0.70
isAttachedFunction · 0.70
setGlobalEvalFunction · 0.70

Tested by

no test coverage detected