D
dd
I need to know whether an element can move itself to a new parent
within the DOM. I can't find any function that offers me such an
ability. Here's an example of a hierarchy:
-body
....div 1 (parent == body)
.... div 2 (parent == body)
.... ... div 3 (parent == div 2)
.... ... ... div 4 (parent == div 3)
What I'd like to do is allow code to change div 4 so that it no longer
has div 3 and div 2 in its parent hierarchy. I'd like it to be in the
same state as div 1, having document.body as its parent.
By having those div 2 and 3 in it's parent hierarchy it's limited by
them in terms of Zindex (even if div 4 sets it's own zindex to 9999999,
it's really only as high as div 3 and div 2). There are also other
potential CSS issues I'm trying to avoid. I'm not expecting a positive
answer here but I figured I'd try.
What I want to try and avoid is creating a new DIV at the body level
because I don't want (IE) to have to wait for document.readyState ==
complete.
within the DOM. I can't find any function that offers me such an
ability. Here's an example of a hierarchy:
-body
....div 1 (parent == body)
.... div 2 (parent == body)
.... ... div 3 (parent == div 2)
.... ... ... div 4 (parent == div 3)
What I'd like to do is allow code to change div 4 so that it no longer
has div 3 and div 2 in its parent hierarchy. I'd like it to be in the
same state as div 1, having document.body as its parent.
By having those div 2 and 3 in it's parent hierarchy it's limited by
them in terms of Zindex (even if div 4 sets it's own zindex to 9999999,
it's really only as high as div 3 and div 2). There are also other
potential CSS issues I'm trying to avoid. I'm not expecting a positive
answer here but I figured I'd try.
What I want to try and avoid is creating a new DIV at the body level
because I don't want (IE) to have to wait for document.readyState ==
complete.