Re: [jQuery] Actually deleting instead of .remove

2010-01-13 Thread Michael Geary
.remove() does remove the element from the document head or body, but that doesn't destroy it. It just makes it available for garbage collection - if there are no other references to the element. For example: var $div = $('test'); $div.appendTo('body'); $div.remove(); Here we've created a new DI

Re: [jQuery] Actually deleting instead of .remove

2010-01-13 Thread Karl Swedberg
Hmm. .remove() doesn't just hide an element; It removes it: if ( this.parentNode ) { this.parentNode.removeChild( this ); } (from the source) To prevent memory leaks, it also removes event handlers associated with it. As of jQuery 1.4, it also removes data assoc