Hi All,

I am wondering if remove() method executed on top DIV (parent DIV
element) will automatically remove the children of this element (as in
remove them from the page and memory if appropriate)? Currently, I am
doing the following to remove the children:

$('topdiv').childElements().each(function(e) {
        RemoveChildren(e);
    });

Where RemoveChildren(e) defined as:

function RemoveChildren(e)
{
    if (e.childElements().length > 0)
    {
        e.childElements().each(function(ee) {
            RemoveChildren(ee);
        });
    }
    e.remove();
}

The method above seems to work slow especially on IE where very
visible lag is apparent when executing this type of cleanup.

Thank you in advance,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to