javascript window.scrollto issue on Ipad

I have a javascript that includes following line of code:


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.




do this:

window.setTimeout(function() {window.scrollTo(x,y);}, 0);

also be aware of the case, scrollto is different to scrollTo in javascript.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.