Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone and iPad end of scrolling

I'm making some jQuery cross-browser gallery with infinite scroll i works great but on iPhone (i suppose also on iPad) instead equal values i have some disproportion values don't match

($(window).scrollTop() == ($(document).height() - $(window).height()) 

i just want to reach the end of scrolling on that , after that i could invoke AJAX script, also have to keep in mind that values changing after two fingers wipe zoom.

like image 893
Nikola Avatar asked Jan 22 '11 17:01

Nikola


1 Answers

You need to account for the 60px URL text field on iPhone. Try this:

($(window).scrollTop() + 60 == ($(document).height() - $(window).height()) 
like image 183
Dan Jenns Avatar answered Sep 18 '22 13:09

Dan Jenns