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

Function remove

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

Source from the content-addressed store, hash-verified

5033}
5034
5035function remove( elem, selector, keepData ) {
5036 var node,
5037 nodes = selector ? jQuery.filter( selector, elem ) : elem,
5038 i = 0;
5039
5040 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
5041 if ( !keepData && node.nodeType === 1 ) {
5042 jQuery.cleanData( getAll( node ) );
5043 }
5044
5045 if ( node.parentNode ) {
5046 if ( keepData && isAttached( node ) ) {
5047 setGlobalEval( getAll( node, "script" ) );
5048 }
5049 node.parentNode.removeChild( node );
5050 }
5051 }
5052
5053 return elem;
5054}
5055
5056jQuery.extend( {
5057 htmlPrefilter: function( html ) {

Callers 1

jQueryFactoryFunction · 0.70

Calls 3

getAllFunction · 0.70
isAttachedFunction · 0.70
setGlobalEvalFunction · 0.70

Tested by

no test coverage detected