prevent scrolling up browser behaviour

I have an interaction on my website that happens on scroll up and in Chrome on my mac when a user scrolls to the bottom of the page, it bounces up a little bit; and, this triggers the interaction causing an undesired effect.

I don't know if this is an OS X or Chrome thing.

Either way, I don't want the scrolling up to happen when the page has reached the bottom unless the user does it or code does it.

How can I prevent this browser behaviour of scrolling back up slightly when reaching the bottom of a page.

Here is what I have to knowing when the bottom of the page is reached:

if($(window).scrollTop() > $(document).height() - $(window).height())

Answers


It seems like something about OSX, i never see anything like that using chrome in windows, have you tested it in other versions? or another browser?


That's probably the "elastic" scrolling of OSX, also implemented in Chrome for OSX (Safari as well). Maybe try out this answer.


Need Your Help

validate a .edu or .ac email address

php javascript email-validation

I'm a noob but trying vigorously to simply validate email addresses that only end in ".edu" or ".ac" is there a simple function/script/solution to this seemingly simple problem? able to use php,

finding sum of values found from a query

mysql sql

Hi I have a query which returns two rows of data as count. I want to find sum of the column values. My sql: