Fires when the ScrollView refreshes.

Event Data

e.pageCount Number

The number of pages. Number

The current page number (zero-based index).

e.preventDefault Function

If invoked, prevents the change event. The ScrollView stays on the current page.


<div id="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>

      refresh: refresh

function refresh(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("Total: ", e.pageCount, " Current: ",;
  //handle event
In this article