See title. Additionally, how can I tell if a given child element is only partially or else wholly out of view (that is, not within the currently scrolled portion) of my 'overflow: auto;' parent element?
views:
78answers:
2
+1
A:
There is no standard way to detect if an element is fully, partially, or not in view within an overflow element. If you have a simple layout - you can do the math yourself using the Prototype Position APIs: http://www.prototypejs.org/api/position
Take a look at the 'within' method which may work for you: http://www.prototypejs.org/api/position/within
msingleton
2009-06-29 05:53:07
Says it's depreciated, though.
Daddy Warbox
2009-06-29 06:19:33
A:
Well, I found this for scrolling to elements in the page, which is related. Would using some maths with .scrollTop and .offsetTop allow me to do something like what I'm looking for?
Edit: Apparently yes.
Daddy Warbox
2009-06-29 06:38:22