scrollTo

Scroll to the given page. Pages are zero-based indexed.

Parameters

page Number

The page to scroll to.

instant Boolean (default: false)

If set to true, the ScrollView will jump instantly to the given page without any animation effects.

    <div data-role="view" data-init="onInit">
      <div id="scrollView" data-role="scrollview">
        <div data-role="page">Foo</div>
        <div data-role="page">Bar</div>
        <div data-role="page">Baz</div>
        <div data-role="page">Bat</div>
      </div>
    </div>


    <script>
    var app = new kendo.mobile.Application();

    function onInit() {
      var scrollview = $("#scrollView").data("kendoMobileScrollView");
      scrollview.scrollTo(2); //scrolls to the 3rd page instantly
    }
    </script>
In this article