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

Function remove

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

Source from the content-addressed store, hash-verified

5038}
5039
5040function remove( elem, selector, keepData ) {
5041 var node,
5042 nodes = selector ? jQuery.filter( selector, elem ) : elem,
5043 i = 0;
5044
5045 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
5046 if ( !keepData && node.nodeType === 1 ) {
5047 jQuery.cleanData( getAll( node ) );
5048 }
5049
5050 if ( node.parentNode ) {
5051 if ( keepData && isAttached( node ) ) {
5052 setGlobalEval( getAll( node, "script" ) );
5053 }
5054 node.parentNode.removeChild( node );
5055 }
5056 }
5057
5058 return elem;
5059}
5060
5061jQuery.extend( {
5062 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