joelambert/ScrollFix — pull request #6 by albertogasparin (2012-06-29 14:38:29+00:00)
Title: Small improvements

Hi Joe,
I've tweaked your code to better fit my needs, but I think my changes could interest you.

1. I've fixed a small lag that sometimes occurs on the first scroll (because startTopScroll was undefined)

2. I've changed the method to get the height (from offsetHeight to clientHeight).
If the element has a border, your scroll function will do it wrong.

3. I've added the ability to prevent the scroll if the element is smaller than the visible area.
It is useful if you want a correct behavior in a WebView app (preventing outer page scroll).