scrollTop in iOS changing horizontal axis
Hi there,
I'm using scrollTop in one of my projects and it works perfectly on all platforms apart from iOS 6..
It's an online form and once you click on one of the fields of the form you are automatically zoomed in to the field..
Then, when scrollTop is called it works fine, but it resets itself to the origin (0, 0) and if possible I would like to scroll from the current horizontal position...
- $("html, body").animate({ scrollTop: 0 }, 600);
I've tried adding scrollLeft for iOS devices but the results are inconsistent (I think this is called by the level of zoom ?!)..
- $("html, body").animate({ scrollTop: 0 , scrollLeft: 500 }, 600);
Anyway, is there a more consistent way to calculate the current horizontal position and pass it to scrollTop to stop it being reset to 0 ??
Many Thanks in advance for your help.
Martin