Hi,
FWIW, I think you can avoid the branching.
To remember an element's position and then remove it:
* * * *
function saveAndRemoveElement(elm) {
var saved;
saved = {
elm:elm,
parent: elm.parentNode,
next: elm.nextSibling // = May be undefined, that's
On Feb 19, 3:55 pm, RobG rg...@iinet.net.au wrote:
[...]
*Do not* use Prototype.js's sibling array as it will remove text
nodes, you certainly don't want to do that.
Not worded quite right: Prototype.js doesn't include text nodes in its
sibling arrays, but they should be used in this case so