Pull to Refresh Page?

How to pull to refresh page? Tried out but not working, i set this on app.js:

// Pull to refresh content
var $ptrContent = $('.ptr-content');
// Add 'refresh' listener on it
$ptrContent.on('ptr:refresh', function (e) {
  mainView.router.reloadPage("/");
}

but the spinner only stays rotating :confused:

Got it!

ptrContent.on('ptr:refresh', function (e) {
  setTimeout(function () {
    location.reload();
  }, 2000);
})
1 Like