Heikki Toivonen wrote:
> As the subject says, if I have a DOM node, is there any way I can scroll to
> I want the window to scroll so that the node becomes visible.
> Heikki Toivonen
This is the way I do: I is the element to scroll to (an image in my
case) and w is the containing window.
var x=I.offsetLeft, y=I.offsetTop, h=I.offsetHeight, win=I.offsetWidth;
for(var P=I.offsetParent; P && P!=w; P=P.offsetParent)
The key is to summarize all offsets until the top level (the window) is