views:

78

answers:

2

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?

+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
Says it's depreciated, though.
Daddy Warbox
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