John Resig schrieb:
>> position: "absolute" becomes position: "static", prependTo("body")[0]
>> becomes prependTo(e.parentNode)[0]
> 
> However, the problem continues to be that you can't do that without
> severe implications. Since you're adding an additional element into
> the parent, it will push the rest of the contents down - and that will
> definitely cause a flash of content moving around. If we can ever,
> reliably, figure out how to get the accurate height/width of an
> element that has display: none, that'll sure be nice.

I see. The problem is, that if you set something to position: absolute, 
it shrinks to fit. Maybe this is also the reason why the height is 
miscalculated.

Another point is that if I append some element to the body, it may 
inherit other styles than where it originally was. Apart from that, in 
my case the element in question is a <dd> element. Appending that to the 
body results in invalid html, and than results may be unpredictable anyway.

And I couldn't see that flash of content although, but maybe my computer 
is too fast.

Maybe you could wrap another element around it with overflow: hidden and 
height: 0, not sure if that works...


-- Klaus



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to