.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
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
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 ones
3 matches
Mail list logo