Monday, April 30, 2012

Re: How to find that an element is now in view on the screen

There is no built in browser mechanism to achieve this, however you can look at the offsets of the target element and its containing element and deduce it yourself.

Also, note that the getClientRects() DOM method can also give you the bounding box information. Still, you'll need to do the math yourself to see if the element is visible or not.

If you want to have something always visible however, why have it in a scroll panel? Why not just place in an absolute position so that it does not scroll?


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment