|
Everytime you remove a child length becomes 1 less, since you are decrementing [i] you will skip a member in your next iteration, I believe your code would work if you just repeated removeChild until length was null. When working with dom try to avoid enumeration if you are adding or deleting elements it easily becomes a dog chasing his tail.
Last edited by Sleeping Troll; 01-25-2009 at 09:47 AM..
|