You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically $(window).height() doesn't work correctly on Mobile Safari. On an iPhone 5 it always returns 444 which is only true when the (entire) address bar is visible. If the address bar is scrolled out of sight it should return 504, but still it return only 444.
What this means is that I have to set a threshold of 60 which is the height of the address bar, if I want images to start load a soon as the appear above the fold.
A solution would be to use window.innerHeight instead of $(window).height(), as this will give the correct value in all cases.
The text was updated successfully, but these errors were encountered:
Basically
$(window).height()
doesn't work correctly on Mobile Safari. On an iPhone 5 it always returns 444 which is only true when the (entire) address bar is visible. If the address bar is scrolled out of sight it should return 504, but still it return only 444.What this means is that I have to set a threshold of 60 which is the height of the address bar, if I want images to start load a soon as the appear above the fold.
A solution would be to use
window.innerHeight
instead of$(window).height()
, as this will give the correct value in all cases.The text was updated successfully, but these errors were encountered: