I have a page being accessed on an external site via an iframe. Some of my JS functions require instantly scrolling to the top of the page, which works fine in a desktop browser. But in a browser on iOS, when my page attempts to scroll to the top of itself while inside the iframe, it just won't work.
I’ve tried everything I can think of: scrollTop = 0, x.scrollTo(0,0), as well as jQuery’s animate({ scrollTop: 0 }) and scrollTop(). All of these were attempted with a wide variety of selectors (an applicable div, window, body, html, document, parent.document, etc).
The answer in this thread also seems to be outdated in newer versions of iOS.
Any help or suggestions to get this running would be appreciated!