After debugging for centuries, I found out that
if($(window).scrollTop() + $(window).height() == $(document).height())
I never managed to meet, well, something happened, but it seems that the mobile safari does not start javascript WHILST, which moves the viewport.
This means that if you do not stop scrolling EXACTLY at the height of the document (without the inflatable bottom thing), it will be very UNEXPECTED equal to the same heights.
So, I just changed the code instead of being the same height to check if it was equal or greater, so it would work even if it scrolls past!
therefore the fix is below
if($(window).scrollTop() + $(window).height() >= $(document).height()){
so the modified code now looks like
jQuery(document).ready(function(){ $ = jQuery; $(window).scroll(function(){ if ($('.iosSlider').is(':visible')) { if($(window).scrollTop() + $(window).height() >= $(document).height()) { $.get('/our-work/fakework.php', function(data) { $('#mobile-thumbs').append(data); }); } } }); });
and now it works like a charm!
source share