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

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 = $('divtest/div'); $div.appendTo('body'); $div.remove(); Here we've created

[jQuery] Actually deleting instead of .remove

2010-01-12 Thread sophos707
Hi everyone, I'm running a script that processes text messages people send in, and then it displays them on a screen. It will loop the text messages when there are too many to show on one screen. To accomplish this I add DIVs with a new ID for each new message. The new messages push the old