How to detect whether an element is in a scrollable parent

November 2nd, 2009 · No Comments

Just think of having an element in a scrollable parent (the CSS property overflow is set to scroll) and you want to test whether the element is visible or not.
Using this little function you can do the trick:

function isInView(node){
var offsetParent = node.offsetParent;
[...]

[Read more →]

Topics: · , , , , , , , , ,