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

Function remove

src/manipulation.js:61–80  ·  view source on GitHub ↗
( elem, selector, keepData )

Source from the content-addressed store, hash-verified

59}
60
61function remove( elem, selector, keepData ) {
62 var node,
63 nodes = selector ? jQuery.filter( selector, elem ) : elem,
64 i = 0;
65
66 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
67 if ( !keepData && node.nodeType === 1 ) {
68 jQuery.cleanData( getAll( node ) );
69 }
70
71 if ( node.parentNode ) {
72 if ( keepData && isAttached( node ) ) {
73 setGlobalEval( getAll( node, "script" ) );
74 }
75 node.parentNode.removeChild( node );
76 }
77 }
78
79 return elem;
80}
81
82jQuery.extend( {
83 htmlPrefilter: function( html ) {

Callers 1

manipulation.jsFile · 0.70

Calls 3

getAllFunction · 0.90
isAttachedFunction · 0.90
setGlobalEvalFunction · 0.90

Tested by

no test coverage detected