changing

Fires before the widget page is changed. The change can be prevented by calling the preventDefault method of the event parameter, in which case the widget will snap back to the current page.

Event Data

e.currentPage Number

The current page (zero based index)

e.nextPage Number

The page about to be displayed (zero based index)

Example - prevent scrolling after 3th page

<div data-role="view">
  <div id="scrollView" data-role="scrollview" data-changing="changing">
    <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 changing(e) {
  if(e.nextPage > 2) {
    e.preventDefault(); //prevent scrolling
  }
}
</script>
In this article
Not finding the help you need? Improve this article