This works everywhere, except for iframe on iOS.
the example is as
when you click on a category it should scroll , only I have the problem that it doesn't work on IOS
https://codepen.io/fdemian/full/ZjpXBe
I used
$('html, body').animate({ scrollTop: offsetTop }, 0);
You have to animate $("body") and not $("html, body") because the mobile ios doesn’t know it
I testesd it again. Seeing other solutions, the following function worked for me:
window.scrollTo(x, y)
$('html,body').animate({scrollTop: x, scrollLeft: y}, milliseconds)