0
votes

I am trying to scroll a list view to the top when a button is clicked, however it doesn't seem to be working.

Here is an example...

http://jsbin.com/jofijowa/1/edit

Essentially, I am trying to move the list view like this...

  function scrollTop() {
    console.log("Hello World"); //debug
    var scroller = $("#flat-listview").kendoMobileScroller()
    console.log(scroller); //debug
    scroller.scrollTop(0);
  }

#flat-listview being the id of the ul

Any ideas?

Thanks

1

1 Answers

0
votes

The Kendo Mobile Scroller uses scrollTop only when the View has native scrolling enabled. When it isn't - it uses CSS transforms for scrolling instead. If you use the reset method of the scroller, it will scroll to the top regardless of the current scrolling type.