Move ScrollPosition in Javascript

how do i Move ScrollPosition from the current Position in Javascript?

  var scrollPos = Observable([0,0]);
  function fiddelWithTheFEEDview(){
    //FEEDScrollView.gotoRelative(0,0);
    //FEEDScrollView.goto(0,0);
  };


  <ScrollView ux:Name="FEEDScrollView" ScrollPosition="{scrollPos}">
  <!-- some data -->
  </ScrollView>

all i want to do is call function fiddelWithTheFEEDview and move the ScrollPosition form where it is 20 pixels down…

Hi Kevin,

from the code you have shown, it seems you are already halfway there. ScrollView has a number of very useful member functions, see the list here.

For one, you have the option to scroll to an absolute position using, for example, ScrollView.goto(0,100).

Two, there’s an option to scroll to a relative position specified by a float in range from 0 to 1 (1 being 100%): ScrollView.gotoRelative(0,0.5).

And three, there is the ScrollPosition UX property, which you might try to use with the help of UX expressions, specifically the y() function, to get the vertical position of another element.

Hope this helps!