How to get Hype to scroll to the top of a page…


(John) #1

I made a layout for a page that fits an iPhone screen width (it’s actually a second layout in my project). The content of the first page fits the iPhone screen without scrolling, but the second page is longer and requires scrolling to get to the “return” button on the bottom.

When you hit the “return” button, it returns to page 1, but I can not get it to scroll to the top of the page. I suspect there’s an easy way to accomplish this with JavaScript, but my still-rudimentary knowledge of JS is limiting.

Any ideas? I’ve attached a sample document that illustrates my problem (when you close down the browser window so only part of page 2 is showing.)

ScrollToTop.hype.zip (51.0 KB)


(Jonathan Deutsch) #2

Yes, JavaScript does have a scroll function; please see this post:


(John) #3

Just what I needed. Thank you very much!


#5