As with the description here , in certain situations $(window).scrollTop() disabled alone in Firefox.
I use this to determine if the vertical scrollbar has reached:
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
It works. But I just accidentally discovered that it only works in most cases. Here is a magazine from the case when it goes wrong. scrollTop says that I scrolled 611 pixels, difference says that I can scroll 612 pixels.
scrollTop: 611 doc height: 933 win height: 321 difference: 612
Is there something wrong with the code? Or is this a problem with Firefox? In the latter case, I think I can change it to check if 5 or fewer pixels remain. But if the code is wrong, I would like to fix it.
Stijn source share