I use the following jquery code to scroll vertically to a specific position on a page. This works absolutely normal in all browsers and does not affect the horizontal scroll position, however, when I try to use it on the iphone (mobile safari) in addition to scrolling to the right place vertically, it also scrolls horizontally to the left. Similarly, if I use scrollleft, it will go to the right place horizontally, but will return to the top of the page. It works great for everything else, and I can not find any link to this problem anywhere, I would be very grateful if anyone who comes across this can help me since I'm at a dead end! I can't even do one after the other (scrollleft then scrollright), since the one I do last cancels the scroll job,established by the previous.
if($.browser.opera)
{
$('html').animate(
{
scrollTop: yscroll - 10
},
1000);
}
else
{
$('html, body').animate(
{
scrollTop: yscroll - 10
},
1000);
}
!
Dave