Reputation: 553
I have a javascript that includes following line of code:
window.scrollto(x,y);
where x and y are the coordinates of the position where there should be scrolled.
This works fine on desktop computers but if I try it on an Ipad it does not scroll properly.
If I put an alert() statement before the window.scroll command it srolls properly. Does anyone know of a fix? Btw the ipad uses ios7.
Thanks
Upvotes: 1
Views: 9077
Reputation: 106
do this:
window.setTimeout(function() {window.scrollTo(x,y);}, 0);
also be aware of the case, scrollto is different to scrollTo in javascript.
Upvotes: 1