Scrolling to top of the page in Mobile Application

Scrolling to top of the page in Mobile Application

  

Hi all,

I'm trying to create a feature in mobile application that on clicking the button it should scroll to top of the page.
I've followed some discussions, one of which is https://www.outsystems.com/forums/discussion/28324/click-on-button-and-will-bring-you-to-the-specific-part-of-the-page-on-the-same-p/#Post147829

but this seems outdated.

I'm trying to create a button with escapeContent as No and then creating a JS to couple it with the button id but in the latest version of Mobile development 'escapeContent' option is not there.


Please help!
Thanks in advance

Use something like:

document.getElementById($parameters.inputId).focus();


assif_tiger wrote:

Use something like:

document.getElementById($parameters.inputId).focus();

Hi 

I tried this but its still not working. 


have you tried using
$([document.documentElement, document.body]).scrollTop(0)

or if you want it animated
$([document.documentElement, document.body]).animate({ scrollTop: 0 }, 2000);