PulltoRefresh.js

A small, but powerful JavaScript library crafted to power your webapp's pull to refresh feature. No markup needed, highly customizable and dependency-free!

Download now!Demos(mobile-only)

How to Install

Download the script, include it in your webapp and initialize it:

PullToRefresh.init({
  mainElement: '#main', // above which element?
  onRefresh(done) {
    setTimeout(() => {
      done(); // end pull to refresh
      alert('refresh');
    }, 1500);
  }
});

You can also return a promise, and more. Check out our demos!

Features